aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/fuzz/notifications.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/test/fuzz/notifications.cpp')
-rw-r--r--src/wallet/test/fuzz/notifications.cpp11
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());
}
};