{ "subject": "Re: Difficulty", "content": { "format": "html", "body": "<div class=\"post\">You were looking at the wrong code. &nbsp;Here's the code that applies:<br/><br/><div class=\"codeheader\">Code:</div><div class=\"code\">bool CBlock::CheckBlock() const<br/>{<br/>...<br/>&nbsp;&nbsp; &nbsp;// Check timestamp<br/>&nbsp;&nbsp; &nbsp;if (nTime &gt; GetAdjustedTime() + 2 * 60 * 60)<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return error(\"CheckBlock() : block timestamp too far in the future\");<br/>...<br/><br/>bool CBlock::AcceptBlock()<br/>{<br/>&nbsp;&nbsp; ...<br/>&nbsp;&nbsp; &nbsp;// Check timestamp against prev<br/>&nbsp;&nbsp; &nbsp;if (nTime &lt;= pindexPrev-&gt;GetMedianTimePast())<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return error(\"AcceptBlock() : block's timestamp is too early\");<br/></div><br/>The timestamp is limited to up to 2 hours in the future.&nbsp; It can be earlier than the previous block, but it must be greater than the median of the last 11 blocks.&nbsp; 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.<br/><br/></div>" }, "source": { "name": "Bitcoin Forum", "url": "https://bitcointalk.org/index.php?topic=587.msg6301#msg6301" }, "date": "2010-07-29T01:16:23Z" }
Inscription number 18,209,392
Genesis block 799,364
File type json
File size 1.65 KB
Creation date Dec 11,2023 1:25 pm