Add BlockManager::IsPruneMode()

This commit is contained in:
MarcoFalke
2023-01-16 17:23:18 +01:00
parent fae71fe27e
commit faf7b4f1fc
7 changed files with 24 additions and 23 deletions

View File

@@ -415,8 +415,9 @@ IndexSummary BaseIndex::GetSummary() const
return summary;
}
void BaseIndex::SetBestBlockIndex(const CBlockIndex* block) {
assert(!node::fPruneMode || AllowPrune());
void BaseIndex::SetBestBlockIndex(const CBlockIndex* block)
{
assert(!m_chainstate->m_blockman.IsPruneMode() || AllowPrune());
if (AllowPrune() && block) {
node::PruneLockInfo prune_lock;