mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
wallet: Assert that the wallet is not initialized in LoadWallet
LoadWallet() cannot be run after the wallet has been initialized. So assert that to avoid making this mistake in the future.
This commit is contained in:
parent
fb0b6ca4e5
commit
bd7f5d33e3
1 changed files with 2 additions and 0 deletions
|
@ -2292,6 +2292,8 @@ DBErrors CWallet::LoadWallet()
|
|||
{
|
||||
LOCK(cs_wallet);
|
||||
|
||||
Assert(m_spk_managers.empty());
|
||||
Assert(m_wallet_flags == 0);
|
||||
DBErrors nLoadWalletRet = WalletBatch(GetDatabase()).LoadWallet(this);
|
||||
if (nLoadWalletRet == DBErrors::NEED_REWRITE)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue