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/test | |
parent | 22351725bc4c5eb63ee45f607374bbf2d76e2b8c (diff) |
wallet: refactor GetNewDestination, use BResult
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/util/wallet.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/util/wallet.cpp b/src/test/util/wallet.cpp index 52aaeabccf..7a00ac9e1f 100644 --- a/src/test/util/wallet.cpp +++ b/src/test/util/wallet.cpp @@ -20,11 +20,10 @@ const std::string ADDRESS_BCRT1_UNSPENDABLE = "bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqq std::string getnewaddress(CWallet& w) { constexpr auto output_type = OutputType::BECH32; - CTxDestination dest; - bilingual_str error; - if (!w.GetNewDestination(output_type, "", dest, error)) assert(false); + auto op_dest = w.GetNewDestination(output_type, ""); + assert(op_dest.HasRes()); - return EncodeDestination(dest); + return EncodeDestination(op_dest.GetObj()); } #endif // ENABLE_WALLET |