mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
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.
This commit is contained in:
parent
846b2fe67e
commit
7379a54ec4
@ -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*) {}});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user