diff options
Diffstat (limited to 'src/test/util.cpp')
-rw-r--r-- | src/test/util.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/test/util.cpp b/src/test/util.cpp index bc09d00b7a..b7bb6deeaa 100644 --- a/src/test/util.cpp +++ b/src/test/util.cpp @@ -17,22 +17,15 @@ #include <wallet/wallet.h> #endif -#include <boost/thread.hpp> - const std::string ADDRESS_BCRT1_UNSPENDABLE = "bcrt1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq3xueyj"; #ifdef ENABLE_WALLET std::string getnewaddress(CWallet& w) { constexpr auto output_type = OutputType::BECH32; - - CPubKey new_key; - if (!w.GetKeyFromPool(new_key)) assert(false); - - w.LearnRelatedScripts(new_key, output_type); - const auto dest = GetDestinationForKey(new_key, output_type); - - w.SetAddressBook(dest, /* label */ "", "receive"); + CTxDestination dest; + std::string error; + if (!w.GetNewDestination(output_type, "", dest, error)) assert(false); return EncodeDestination(dest); } |