mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
[walletdb] Add missing LOCK() in Recover() for dummyWallet
This commit is contained in:
@@ -960,8 +960,13 @@ bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKe
|
|||||||
CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION);
|
CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION);
|
||||||
CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION);
|
CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION);
|
||||||
string strType, strErr;
|
string strType, strErr;
|
||||||
bool fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue,
|
bool fReadOK;
|
||||||
|
{
|
||||||
|
// Required in LoadKeyMetadata():
|
||||||
|
LOCK(dummyWallet.cs_wallet);
|
||||||
|
fReadOK = ReadKeyValue(&dummyWallet, ssKey, ssValue,
|
||||||
wss, strType, strErr);
|
wss, strType, strErr);
|
||||||
|
}
|
||||||
if (!IsKeyType(strType))
|
if (!IsKeyType(strType))
|
||||||
continue;
|
continue;
|
||||||
if (!fReadOK)
|
if (!fReadOK)
|
||||||
|
|||||||
Reference in New Issue
Block a user