aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/walletdb.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2015-12-19 14:26:56 +0100
committerMarcoFalke <[email protected]>2015-12-19 14:26:46 +0100
commitfa33d9740c9b0d1071094ab6c1736f27a7090c95 (patch)
treeb820b7393284821f447935174d731713495c9304 /src/wallet/walletdb.cpp
parent[qa] check if wallet or blochchain maintenance changes the balance (diff)
downloaddiscoin-fa33d9740c9b0d1071094ab6c1736f27a7090c95.tar.xz
discoin-fa33d9740c9b0d1071094ab6c1736f27a7090c95.zip
[walletdb] Add missing LOCK() in Recover() for dummyWallet
Diffstat (limited to 'src/wallet/walletdb.cpp')
-rw-r--r--src/wallet/walletdb.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index e2e827d81..44b79ed1f 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)