diff options
author | Jon Atack <jon@atack.com> | 2022-01-18 12:51:03 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2022-01-25 20:43:34 +0100 |
commit | eaeeb88768db529b5241ccd42f1e87579908b4df (patch) | |
tree | 2b9d3c6264ad0f8de7515fd044a82f4a8acda273 /src/node/blockstorage.cpp | |
parent | ca47b005770f71aa229ecc1f7b8146a96ff02151 (diff) |
Require IsBlockPruned() to hold mutex cs_main
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
Diffstat (limited to 'src/node/blockstorage.cpp')
-rw-r--r-- | src/node/blockstorage.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |