diff options
| author | practicalswift <[email protected]> | 2018-04-29 20:15:05 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-04-29 20:15:05 +0200 |
| commit | 968b76f77ca51b9df737011ff486efbae9c8de81 (patch) | |
| tree | 0fdb67cdd8a4b90c7992ebf7b26510ac17649884 | |
| parent | Add locking annotations for variables guarded by cs_KeyStore (diff) | |
| download | discoin-968b76f77ca51b9df737011ff486efbae9c8de81.tar.xz discoin-968b76f77ca51b9df737011ff486efbae9c8de81.zip | |
Add missing cs_KeyStore lock
| -rw-r--r-- | src/wallet/wallet.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index ad3dd4cd2..a760d2d13 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; |