Skip to content

Commit 7379a54

Browse files
committed
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.
1 parent 846b2fe commit 7379a54

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/bench/wallet_balance.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ static void WalletBalance(benchmark::Bench& bench, const bool set_dirty, const b
2626
LOCK(wallet.cs_wallet);
2727
wallet.SetWalletFlag(WALLET_FLAG_DESCRIPTORS);
2828
wallet.SetupDescriptorScriptPubKeyMans();
29-
if (wallet.LoadWallet() != DBErrors::LOAD_OK) assert(false);
3029
}
3130
auto handler = test_setup->m_node.chain->handleNotifications({&wallet, [](CWallet*) {}});
3231

0 commit comments

Comments
 (0)