diff options
author | MarcoFalke <falke.marco@gmail.com> | 2015-12-19 14:26:56 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2015-12-19 14:26:46 +0100 |
commit | fa33d9740c9b0d1071094ab6c1736f27a7090c95 (patch) | |
tree | b820b7393284821f447935174d731713495c9304 /src/wallet | |
parent | fa14d994843fe2d700c977653cd3133d0a77cb67 (diff) |
[walletdb] Add missing LOCK() in Recover() for dummyWallet
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/walletdb.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index e2e827d816..44b79ed1fc 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -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) |