diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index b668a60f1f5c9..057a86add841d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1249,7 +1249,7 @@ bool CWallet::AbandonTransaction(const uint256& hashTx) void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx) { - LOCK2(cs_main, cs_wallet); + LOCK2(cs_main, cs_wallet); // check "LOCK2(cs_main, pwallet->cs_wallet);" in CWalletDB::LoadWallet() int conflictconfirms = 0; if (mapBlockIndex.count(hashBlock)) { diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 3714a51f7748d..645c8b21e6413 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -586,7 +586,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) bool fNoncriticalErrors = false; DBErrors result = DB_LOAD_OK; - LOCK(pwallet->cs_wallet); + LOCK2(cs_main, pwallet->cs_wallet); try { int nMinVersion = 0; if (Read((std::string)"minversion", nMinVersion))