Define 7200 second timestamp window constant

This commit is contained in:
Russell Yanofsky
2017-03-02 12:20:34 -05:00
parent 3fabae7425
commit e57a1fd899
8 changed files with 27 additions and 13 deletions

View File

@@ -2983,7 +2983,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
return state.Invalid(false, REJECT_INVALID, "time-too-old", "block's timestamp is too early");
// Check timestamp
if (block.GetBlockTime() > nAdjustedTime + 2 * 60 * 60)
if (block.GetBlockTime() > nAdjustedTime + MAX_FUTURE_BLOCK_TIME)
return state.Invalid(false, REJECT_INVALID, "time-too-new", "block timestamp too far in the future");
// Reject outdated version blocks when 95% (75% on testnet) of the network has upgraded: