mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge 9a288430df into merged_master (Bitcoin PR bitcoin/bitcoin#26900)
This commit is contained in:
commit
5b2b315520
9 changed files with 53 additions and 45 deletions
|
|
@ -84,8 +84,6 @@ using node::BlockManager;
|
|||
using node::BlockMap;
|
||||
using node::CBlockIndexHeightOnlyComparator;
|
||||
using node::CBlockIndexWorkComparator;
|
||||
using node::fImporting;
|
||||
using node::fPruneMode;
|
||||
using node::fReindex;
|
||||
using node::ReadBlockFromDisk;
|
||||
using node::SnapshotMetadata;
|
||||
|
|
@ -1673,8 +1671,9 @@ bool Chainstate::IsInitialBlockDownload() const
|
|||
LOCK(cs_main);
|
||||
if (m_cached_finished_ibd.load(std::memory_order_relaxed))
|
||||
return false;
|
||||
if (fImporting || fReindex)
|
||||
if (m_chainman.m_blockman.LoadingBlocks()) {
|
||||
return true;
|
||||
}
|
||||
if (m_chain.Tip() == nullptr)
|
||||
return true;
|
||||
if (m_chain.Tip()->nChainWork < m_chainman.MinimumChainWork()) {
|
||||
|
|
@ -2648,7 +2647,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
|
||||
|
|
@ -4571,7 +4570,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue