mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
Add BlockManager::IsPruneMode()
This commit is contained in:
@@ -76,7 +76,6 @@ using node::BlockManager;
|
||||
using node::BlockMap;
|
||||
using node::CBlockIndexHeightOnlyComparator;
|
||||
using node::CBlockIndexWorkComparator;
|
||||
using node::fPruneMode;
|
||||
using node::fReindex;
|
||||
using node::ReadBlockFromDisk;
|
||||
using node::SnapshotMetadata;
|
||||
@@ -2411,7 +2410,7 @@ bool Chainstate::FlushStateToDisk(
|
||||
|
||||
CoinsCacheSizeState cache_state = GetCoinsCacheSizeState();
|
||||
LOCK(m_blockman.cs_LastBlockFile);
|
||||
if (fPruneMode && (m_blockman.m_check_for_pruning || nManualPruneHeight > 0) && !fReindex) {
|
||||
if (m_blockman.IsPruneMode() && (m_blockman.m_check_for_pruning || nManualPruneHeight > 0) && !fReindex) {
|
||||
// make sure we don't prune above any of the prune locks bestblocks
|
||||
// pruning is height-based
|
||||
int last_prune{m_chain.Height()}; // last height we can prune
|
||||
@@ -4097,7 +4096,7 @@ bool CVerifyDB::VerifyDB(
|
||||
if (pindex->nHeight <= chainstate.m_chain.Height() - nCheckDepth) {
|
||||
break;
|
||||
}
|
||||
if ((fPruneMode || is_snapshot_cs) && !(pindex->nStatus & BLOCK_HAVE_DATA)) {
|
||||
if ((chainstate.m_blockman.IsPruneMode() || is_snapshot_cs) && !(pindex->nStatus & BLOCK_HAVE_DATA)) {
|
||||
// If pruning or running under an assumeutxo snapshot, only go
|
||||
// back as far as we have data.
|
||||
LogPrintf("VerifyDB(): block verification stopping at height %d (pruning, no data)\n", pindex->nHeight);
|
||||
|
||||
Reference in New Issue
Block a user