diff options
author | Andrew Chow <github@achow101.com> | 2023-02-17 19:54:47 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2023-05-25 14:40:42 -0400 |
commit | 7379a54ec416c8c0a029cc41835a23d42cb6d800 (patch) | |
tree | feb7e2fe8756de06963a296269408d326eaaf2db /src | |
parent | 846b2fe67ed76a678770d343153acedadfdacd0b (diff) | |
download | bitcoin-7379a54ec416c8c0a029cc41835a23d42cb6d800.tar.xz |
bench: Remove incorrect LoadWallet call in WalletBalance
The WalletBalance benchmarks would incorrectly call LoadWallet after the
wallet has been setup. LoadWallet expects to be the first thing that is
called and for the CWallet to be in a fresh state. When it is not, it
results in bogus pointers which can cause segfaults during this
benchmark.
Diffstat (limited to 'src')
-rw-r--r-- | src/bench/wallet_balance.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/bench/wallet_balance.cpp b/src/bench/wallet_balance.cpp index cafe7a0c60..509716c716 100644 --- a/src/bench/wallet_balance.cpp +++ b/src/bench/wallet_balance.cpp @@ -26,7 +26,6 @@ static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const b LOCK(wallet.cs_wallet); wallet.SetWalletFlag(WALLET_FLAG_DESCRIPTORS); wallet.SetupDescriptorScriptPubKeyMans(); - if (wallet.LoadWallet() != DBErrors::LOAD_OK) assert(false); } auto handler = test_setup->m_node.chain->handleNotifications({&wallet, [](CWallet*) {}}); |