refactor: Mark IsBlockPruned const

Member fields are used read-only in this method.
This commit is contained in:
MarcoFalke 2024-07-11 10:50:28 +02:00
parent 45f757c726
commit aaaa3323f3
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -588,7 +588,7 @@ const CBlockIndex* BlockManager::GetLastCheckpoint(const CCheckpointData& data)
return nullptr;
}
bool BlockManager::IsBlockPruned(const CBlockIndex& block)
bool BlockManager::IsBlockPruned(const CBlockIndex& block) const
{
AssertLockHeld(::cs_main);
return m_have_pruned && !(block.nStatus & BLOCK_HAVE_DATA) && (block.nTx > 0);