aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-04-29 20:15:05 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-04-29 20:15:05 +0200
commit968b76f77ca51b9df737011ff486efbae9c8de81 (patch)
tree0fdb67cdd8a4b90c7992ebf7b26510ac17649884 /src
parent4bcd5bb87d5725a3e4f267d2c637177c311559f9 (diff)
downloadbitcoin-968b76f77ca51b9df737011ff486efbae9c8de81.tar.xz
Add missing cs_KeyStore lock
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index ad3dd4cd2c..a760d2d13e 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3176,8 +3176,11 @@ DBErrors CWallet::LoadWallet(bool& fFirstRunRet)
}
}
- // This wallet is in its first run if all of these are empty
- fFirstRunRet = mapKeys.empty() && mapCryptedKeys.empty() && mapWatchKeys.empty() && setWatchOnly.empty() && mapScripts.empty();
+ {
+ LOCK(cs_KeyStore);
+ // This wallet is in its first run if all of these are empty
+ fFirstRunRet = mapKeys.empty() && mapCryptedKeys.empty() && mapWatchKeys.empty() && setWatchOnly.empty() && mapScripts.empty();
+ }
if (nLoadWalletRet != DBErrors::LOAD_OK)
return nLoadWalletRet;