mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Merge pull request #7208
64360f1 Make max tip age an option instead of chainparam (Wladimir J. van der Laan)
This commit is contained in:
@@ -75,6 +75,9 @@ bool fCheckpointsEnabled = DEFAULT_CHECKPOINTS_ENABLED;
|
||||
size_t nCoinCacheUsage = 5000 * 300;
|
||||
uint64_t nPruneTarget = 0;
|
||||
bool fAlerts = DEFAULT_ALERTS;
|
||||
/* If the tip is older than this (in seconds), the node is considered to be in initial block download.
|
||||
*/
|
||||
int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE;
|
||||
|
||||
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying, mining and transaction creation) */
|
||||
CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
|
||||
@@ -1377,7 +1380,7 @@ bool IsInitialBlockDownload()
|
||||
if (lockIBDState)
|
||||
return false;
|
||||
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
|
||||
pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge());
|
||||
pindexBestHeader->GetBlockTime() < GetTime() - nMaxTipAge);
|
||||
if (!state)
|
||||
lockIBDState = true;
|
||||
return state;
|
||||
|
||||
Reference in New Issue
Block a user