diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-10-12 14:25:38 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-10-15 15:23:07 -0400 |
commit | 9bf02438727e1052c69d906252fc2a451c923409 (patch) | |
tree | 8795e5b63b4cf94945fc472e6182ccaa447781e7 /src/test/util/wallet.cpp | |
parent | 5e54aa9b90c5d4d472be47a7fca969c5e7b92e88 (diff) |
bench: Use DescriptorScriptPubKeyMan for wallet things
For wallet related benchmarks that need a ScriptPubKeyMan for operation,
use a DescriptorScriptPubKeyMan
Diffstat (limited to 'src/test/util/wallet.cpp')
-rw-r--r-- | src/test/util/wallet.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/test/util/wallet.cpp b/src/test/util/wallet.cpp index 061659818f..76c1bf93a5 100644 --- a/src/test/util/wallet.cpp +++ b/src/test/util/wallet.cpp @@ -25,16 +25,4 @@ std::string getnewaddress(CWallet& w) return EncodeDestination(dest); } -void importaddress(CWallet& wallet, const std::string& address) -{ - auto spk_man = wallet.GetLegacyScriptPubKeyMan(); - LOCK2(wallet.cs_wallet, spk_man->cs_KeyStore); - const auto dest = DecodeDestination(address); - assert(IsValidDestination(dest)); - const auto script = GetScriptForDestination(dest); - wallet.MarkDirty(); - assert(!spk_man->HaveWatchOnly(script)); - if (!spk_man->AddWatchOnly(script, 0 /* nCreateTime */)) assert(false); - wallet.SetAddressBook(dest, /* label */ "", "receive"); -} #endif // ENABLE_WALLET |