mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Require IsBlockPruned() to hold mutex cs_main
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
This commit is contained in:
parent
ca47b00577
commit
eaeeb88768
3 changed files with 7 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue