aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-01-12 00:56:27 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2018-03-06 19:21:16 +0000
commit43a32b739551b5a6cac8102afd52e2b9efc81726 (patch)
tree26448f1027b0c25aaa9e59051b4f01e8b600f32b
parentf814a3e8fa0d99c3d95ae7866c707617a1dd3d4e (diff)
Add missing cs_lock in CreateWalletFromFile
-rw-r--r--src/wallet/wallet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index bb7be2df33..78abd77002 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -4017,6 +4017,8 @@ CWallet* CWallet::CreateWalletFromFile(const std::string walletFile)
// Try to top up keypool. No-op if the wallet is locked.
walletInstance->TopUpKeyPool();
+ LOCK(cs_main);
+
CBlockIndex *pindexRescan = chainActive.Genesis();
if (!gArgs.GetBoolArg("-rescan", false))
{