Re: Difficulty
You were looking at the wrong code. Here's the code that applies:
Code:
bool CBlock::CheckBlock() const
{
...
// Check timestamp
if (nTime > GetAdjustedTime() + 2 * 60 * 60)
return error("CheckBlock() : block timestamp too far in the future");
...
bool CBlock::AcceptBlock()
{
...
// Check timestamp against prev
if (nTime <= pindexPrev->GetMedianTimePast())
return error("AcceptBlock() : block's timestamp is too early");
The timestamp is limited to up to 2 hours in the future. It can be earlier than the previous block, but it must be greater than the median of the last 11 blocks. The reason for doing it that way is so the time can get corrected in the next block if the previous block had the time too far in the future, like what happened.
Details
- Date and time of publication:
- Category: Bitcoin Forum
- Source Author/From/Name: satoshi
- Source URL: https://bitcointalk.org/index.php?topic=587.msg6301#msg6301
- Page was last modified: 2102 days ago
- View counter: 627