Reformat version in UpdateTip and other messages

This commit is contained in:
Pieter Wuille
2016-03-29 16:46:20 +02:00
committed by lateminer
parent 52bcc93c77
commit 88c725c6ac
2 changed files with 9 additions and 1 deletions

View File

@@ -3575,6 +3575,14 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
return state.Invalid(error("%s: block timestamp too far in the future", __func__),
REJECT_INVALID, "time-too-new");
/*
// Reject outdated version blocks when 95% (75% on testnet) of the network has upgraded:
for (int32_t version = 2; version < 5; ++version) // check for version 2, 3 and 4 upgrades
if (block.nVersion < version && IsSuperMajority(version, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
return state.Invalid(false, REJECT_OBSOLETE, strprintf("bad-version(0x%08x)", version - 1),
strprintf("rejected nVersion=0x%08x block", version - 1));
*/
return true;
}