Bitcoin Forum
May 23, 2024, 11:06:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Block timestamp must not be more than two hours in the future. What src file?  (Read 1071 times)
qdoop (OP)
Member
**
Offline Offline

Activity: 119
Merit: 112


_copy_improve_


View Profile WWW
October 17, 2014, 05:46:40 AM
 #1


Could some one help me locate where the following protocol rules are enforced in Bitcoin Core src.
What files should i read?

a) Block timestamp must not be more than two hours in the future.
b) Reject if timestamp is the median time of the last 11 blocks or before

PS. Perhaps the answer should be RTFM but I may miss something important.

Thanks in advance.

_copy_improve_
news flow http://www.qdoop.org/
(offline) The simple bitcoin game  http://qdoop.net Testnet3 block explorer   http://pool.qdoop.net:18331/chain/Testnet3
Foxpup
Legendary
*
Offline Offline

Activity: 4368
Merit: 3045


Vile Vixen and Miss Bitcointalk 2021-2023


View Profile
October 17, 2014, 09:46:39 AM
 #2

a) is in the CheckBlockHeader() function (was CheckBlock() in older versions).
b) is in the AcceptBlockHeader() function (AcceptBlock() in older versions).
Both are defined in main.cpp.

Will pretend to do unspeakable things (while actually eating a taco) for bitcoins: 1K6d1EviQKX3SVKjPYmJGyWBb1avbmCFM4
I am not on the scammers' paradise known as Telegram! Do not believe anyone claiming to be me off-forum without a signed message from the above address! Accept no excuses and make no exceptions!
qdoop (OP)
Member
**
Offline Offline

Activity: 119
Merit: 112


_copy_improve_


View Profile WWW
October 17, 2014, 09:59:05 AM
 #3

Thanks a lot  Roll Eyes

Looked to other places and skipped the obvious!

_copy_improve_
news flow http://www.qdoop.org/
(offline) The simple bitcoin game  http://qdoop.net Testnet3 block explorer   http://pool.qdoop.net:18331/chain/Testnet3
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!