diff options
Diffstat (limited to 'src/test/util/wallet.cpp')
-rw-r--r-- | src/test/util/wallet.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/util/wallet.cpp b/src/test/util/wallet.cpp index 7a00ac9e1f..b54774cbb9 100644 --- a/src/test/util/wallet.cpp +++ b/src/test/util/wallet.cpp @@ -8,6 +8,7 @@ #include <outputtype.h> #include <script/standard.h> #ifdef ENABLE_WALLET +#include <util/check.h> #include <util/translation.h> #include <wallet/wallet.h> #endif @@ -20,10 +21,7 @@ const std::string ADDRESS_BCRT1_UNSPENDABLE = "bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqq std::string getnewaddress(CWallet& w) { constexpr auto output_type = OutputType::BECH32; - auto op_dest = w.GetNewDestination(output_type, ""); - assert(op_dest.HasRes()); - - return EncodeDestination(op_dest.GetObj()); + return EncodeDestination(*Assert(w.GetNewDestination(output_type, ""))); } #endif // ENABLE_WALLET |