From eaeeb88768db529b5241ccd42f1e87579908b4df Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Tue, 18 Jan 2022 12:51:03 +0100 Subject: Require IsBlockPruned() to hold mutex cs_main Co-authored-by: Vasil Dimov --- src/node/blockstorage.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/node/blockstorage.cpp') diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index 2c18ee0c7d..5f6bf535b3 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -429,6 +429,7 @@ CBlockIndex* BlockManager::GetLastCheckpoint(const CCheckpointData& data) bool IsBlockPruned(const CBlockIndex* pblockindex) { + AssertLockHeld(::cs_main); return (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0); } -- cgit v1.2.3