Skip to content

Commit 07afcd6

Browse files
committed
Add missing cs_wallet lock that triggers new lock held assertion
A new AssertLockHeld(cs_wallet) call was added in commit a58370e "Dedup nTimeFirstKey update logic" (part of PR #9108). The lock held assertion will fail when loading prexisting wallets files from before the #9108 merge that have watch-only keys.
1 parent 7a93af8 commit 07afcd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/walletdb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,8 +559,8 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
559559
bool fNoncriticalErrors = false;
560560
DBErrors result = DB_LOAD_OK;
561561

562+
LOCK(pwallet->cs_wallet);
562563
try {
563-
LOCK(pwallet->cs_wallet);
564564
int nMinVersion = 0;
565565
if (Read((string)"minversion", nMinVersion))
566566
{

0 commit comments

Comments
 (0)