aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2023-12-08 17:49:51 -0500
committerAndrew Chow <github@achow101.com>2023-12-11 17:03:25 -0500
commitfb0b6ca4e5d981cf58bf23ae2993117f171608e8 (patch)
tree834ccdb56ee5e30865f156b244224b45a1a364c2 /src/wallet/test
parent3e691258d8789a4a89cce42e7e71b130491594d7 (diff)
downloadbitcoin-fb0b6ca4e5d981cf58bf23ae2993117f171608e8.tar.xz
tests, bench: Remove incorrect LoadWallet() calls
LoadWallet() must only be called immediately after a CWallet is constructed, or not at all. Doing so after any other CWallet member functions have been called may cause pointers and other objects setup by other those functions to become invalidated. Since these tests and benchmarks are using completely new wallets with mock databases, it's not necessary to call LoadWallet() anyways, so these can be dropped.
Diffstat (limited to 'src/wallet/test')
-rw-r--r--src/wallet/test/util.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/wallet/test/util.cpp b/src/wallet/test/util.cpp
index ad8613d515..cbf3ccd1ec 100644
--- a/src/wallet/test/util.cpp
+++ b/src/wallet/test/util.cpp
@@ -24,7 +24,6 @@ std::unique_ptr<CWallet> CreateSyncedWallet(interfaces::Chain& chain, CChain& cc
LOCK2(wallet->cs_wallet, ::cs_main);
wallet->SetLastBlockProcessed(cchain.Height(), cchain.Tip()->GetBlockHash());
}
- wallet->LoadWallet();
{
LOCK(wallet->cs_wallet);
wallet->SetWalletFlag(WALLET_FLAG_DESCRIPTORS);