Take a lock on cs_main in DecrementNoteWitnesses
Another possibly better approach would be to take a lock inside GetSaplingSpendDepth since we want the lock to apply to as little code as possible and it is GetSaplingSpendDepth that calls GetDepthInMainChain which requires a cs_main lock .
This commit is contained in:
@@ -977,7 +977,7 @@ void CWallet::ClearNoteWitnessCache()
|
||||
|
||||
void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex)
|
||||
{
|
||||
LOCK(cs_wallet);
|
||||
LOCK2(cs_main, cs_wallet);
|
||||
|
||||
extern int32_t HUSH_REWIND;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user