Browse Source

[walletdb] Add missing LOCK() in Recover() for dummyWallet

0.13
MarcoFalke 9 years ago
parent
commit
fa33d9740c
  1. 7
      src/wallet/walletdb.cpp

7
src/wallet/walletdb.cpp

@ -960,8 +960,13 @@ bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKe @@ -960,8 +960,13 @@ bool CWalletDB::Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKe
CDataStream ssKey(row.first, SER_DISK, CLIENT_VERSION);
CDataStream ssValue(row.second, SER_DISK, CLIENT_VERSION);
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);
}
if (!IsKeyType(strType))
continue;
if (!fReadOK)

Loading…
Cancel
Save