diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 26faed52a..01af7b78e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -887,7 +887,6 @@ bool CWallet::IsSaplingSpent(const uint256& nullifier) const { } unsigned int CWallet::GetSaplingSpendDepth(const uint256& nullifier) const { - LOCK(cs_main); pair range; range = mapTxSaplingNullifiers.equal_range(nullifier); @@ -979,10 +978,9 @@ void CWallet::ClearNoteWitnessCache() void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) { - extern int32_t HUSH_REWIND; - LOCK(cs_wallet); + LOCK2(cs_main, cs_wallet); for (std::pair& wtxItem : mapWallet) { //Sapling