aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-01-07 09:16:59 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-01-07 09:17:11 +0100
commitd964b5bb1a1c3664167819c0632500b924c38347 (patch)
treee2934af9da8979e2072224a6e5f27f49d22e5a78 /src/wallet
parentde9e5ea75e468a853ab82904fee552128b2d824e (diff)
parentfa33d9740c9b0d1071094ab6c1736f27a7090c95 (diff)
Merge pull request #7229
fa33d97 [walletdb] Add missing LOCK() in Recover() for dummyWallet (MarcoFalke) fa14d99 [qa] check if wallet or blochchain maintenance changes the balance (MarcoFalke) fa0765d [qa] Cleanup wallet.py test (MarcoFalke)
Diffstat (limited to 'src/wallet')
-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 f0e1776958..5266946ca0 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -966,8 +966,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)