diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-05-24 21:59:54 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-07-08 11:18:35 -0300 |
commit | 111ea3ab711414236f8678566a7884d48619b2d8 (patch) | |
tree | 5d4fa02e5aeb208d51f268dec3e6bcf1350e0a98 /src/wallet/test/fuzz/notifications.cpp | |
parent | 22351725bc4c5eb63ee45f607374bbf2d76e2b8c (diff) | |
download | bitcoin-111ea3ab711414236f8678566a7884d48619b2d8.tar.xz |
wallet: refactor GetNewDestination, use BResult
Diffstat (limited to 'src/wallet/test/fuzz/notifications.cpp')
-rw-r--r-- | src/wallet/test/fuzz/notifications.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/wallet/test/fuzz/notifications.cpp b/src/wallet/test/fuzz/notifications.cpp index 9089c8ff46..816bef6148 100644 --- a/src/wallet/test/fuzz/notifications.cpp +++ b/src/wallet/test/fuzz/notifications.cpp @@ -69,15 +69,14 @@ struct FuzzedWallet { CScript GetScriptPubKey(FuzzedDataProvider& fuzzed_data_provider) { auto type{fuzzed_data_provider.PickValueInArray(OUTPUT_TYPES)}; - CTxDestination dest; - bilingual_str error; + BResult<CTxDestination> op_dest; if (fuzzed_data_provider.ConsumeBool()) { - assert(wallet->GetNewDestination(type, "", dest, error)); + op_dest = wallet->GetNewDestination(type, ""); } else { - assert(wallet->GetNewChangeDestination(type, dest, error)); + op_dest = wallet->GetNewChangeDestination(type); } - assert(error.empty()); - return GetScriptForDestination(dest); + assert(op_dest.HasRes()); + return GetScriptForDestination(op_dest.GetObj()); } }; |