mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-03-05 18:46:01 +00:00
Make assume valid minimum interval per-chain configurable
Make assume valid minimum interval per-chain configurable as syncing 21,000 blocks in a regression test isn't an achievable goal.
This commit is contained in:
parent
878c07a847
commit
4a7cb45aa7
@ -93,6 +93,7 @@ public:
|
||||
|
||||
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000001533efd8d716a517fe2c5008");
|
||||
consensus.defaultAssumeValid = uint256S("0x0000000000000000000b9d2ec5a352ecba0592946514a92f14319dc2b367fc72"); // 654683
|
||||
consensus.nAssumeValidMinTime = 60 * 60 * 24 * 7 * 2;
|
||||
|
||||
consensus.fShortEarlyCoinbase = true;
|
||||
|
||||
@ -208,6 +209,7 @@ public:
|
||||
|
||||
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000001db6ec4ac88cf2272c6");
|
||||
consensus.defaultAssumeValid = uint256S("0x000000000000006433d1efec504c53ca332b64963c425395515b01977bd7b3b0"); // 1864000
|
||||
consensus.nAssumeValidMinTime = 60 * 60 * 24 * 7 * 2;
|
||||
|
||||
consensus.fShortEarlyCoinbase = true;
|
||||
|
||||
@ -326,6 +328,7 @@ public:
|
||||
consensus.nPowTargetSpacing = 60; // 1 minute
|
||||
consensus.fPowAllowMinDifficultyBlocks = false;
|
||||
consensus.fPowNoRetargeting = false;
|
||||
consensus.nAssumeValidMinTime = 60 * 60 * 24 * 7 * 2;
|
||||
consensus.nRuleChangeActivationThreshold = 1900; // 95% of 2000
|
||||
consensus.nMinerConfirmationWindow = 2000; // nPowTargetTimespan / nPowTargetSpacing
|
||||
consensus.MinBIP9WarningHeight = 0;
|
||||
@ -408,6 +411,7 @@ public:
|
||||
|
||||
consensus.nMinimumChainWork = uint256{};
|
||||
consensus.defaultAssumeValid = uint256{};
|
||||
consensus.nAssumeValidMinTime = 60 * 60 * 24 * 7 * 2 / 10; // One tenth of main/test networks
|
||||
|
||||
consensus.fShortEarlyCoinbase = false;
|
||||
|
||||
|
||||
@ -83,6 +83,8 @@ struct Params {
|
||||
uint256 nMinimumChainWork;
|
||||
/** By default assume that the signatures in ancestors of this block are valid */
|
||||
uint256 defaultAssumeValid;
|
||||
/** Minimum interval an assumed valid block must be buried, to be valid. */
|
||||
int64_t nAssumeValidMinTime;
|
||||
|
||||
/**
|
||||
* If true, witness commitments contain a payload equal to a Bitcoin Script solution
|
||||
|
||||
@ -2014,7 +2014,7 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
||||
// artificially set the default assumed verified block further back.
|
||||
// The test against nMinimumChainWork prevents the skipping when denied access to any chain at
|
||||
// least as good as the expected chain.
|
||||
fScriptChecks = (GetBlockProofEquivalentTime(*pindexBestHeader, *pindex, *pindexBestHeader, chainparams.GetConsensus()) <= 60 * 60 * 24 * 7 * 2);
|
||||
fScriptChecks = (GetBlockProofEquivalentTime(*pindexBestHeader, *pindex, *pindexBestHeader, chainparams.GetConsensus()) <= chainparams.GetConsensus().nAssumeValidMinTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user