Created
July 29, 2018 17:34
-
-
Save meyer9/0367829a7e162c6153e6f1d39e8b68de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/crypter.cpp b/src/crypter.cpp | |
index d3866652b..55eeb6645 100644 | |
--- a/src/crypter.cpp | |
+++ b/src/crypter.cpp | |
@@ -259,7 +259,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn) | |
uint256 hashSeed; | |
if (CWalletDB(pwalletMain->strWalletFile).ReadCurrentSeedHash(hashSeed)) { | |
- | |
+ LOCK(pwalletMain->cs_wallet); | |
uint256 nSeed; | |
if (!GetDeterministicSeed(hashSeed, nSeed)) { | |
return error("Failed to read zPHR seed from DB. Wallet is probably corrupt."); | |
diff --git a/src/zphrwallet.cpp b/src/zphrwallet.cpp | |
index fd28e93de..402ec1b96 100644 | |
--- a/src/zphrwallet.cpp | |
+++ b/src/zphrwallet.cpp | |
@@ -14,6 +14,7 @@ using namespace libzerocoin; | |
CzPHRWallet::CzPHRWallet(std::string strWalletFile) | |
{ | |
+ LOCK(pwalletMain->cs_wallet); | |
this->strWalletFile = strWalletFile; | |
CWalletDB walletdb(strWalletFile); | |
@@ -69,7 +70,7 @@ CzPHRWallet::CzPHRWallet(std::string strWalletFile) | |
bool CzPHRWallet::SetMasterSeed(const uint256& seedMaster, bool fResetCount) | |
{ | |
- | |
+ LOCK(pwalletMain->cs_wallet); | |
CWalletDB walletdb(strWalletFile); | |
if (pwalletMain->IsLocked()) | |
return false; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment