From 3a0c71af6c8331a6c2f7d79a67deb838baa58855 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Mon, 18 Aug 2025 12:07:33 +0200 Subject: [PATCH] walletdb: lock cs_wallet for loadspecificblindingkey --- src/wallet/walletdb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index eaab261aca..52446d74a8 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -778,6 +778,7 @@ static DBErrors LoadLegacyWalletRecords(CWallet* pwallet, DatabaseBatch& batch, key >> scriptid; uint256 blinding_key; value >> blinding_key; + LOCK(pwallet->cs_wallet); if (!pwallet->LoadSpecificBlindingKey(CScriptID(scriptid), blinding_key)) { pwallet->WalletLogPrintf("Error reading wallet database: LoadSpecificBlindingKey failed\n"); return DBErrors::LOAD_FAIL;