Blockchain By Example
上QQ阅读APP看书,第一时间看更新

ChainTxData

The next maneuver is to change some parameters in the chaintxdata structure, which represents the blockchain state at a specific timestamp using the data of a specific block. In the Bitcoin code, you will find recorded the blockchain snapshot's state at January 3, 2017, where the total number had reached 446,482 mined blocks:

As our chain doesn't yet have any blocks, we can use our genesis block instead and edit the values accordingly. Thus, the first argument, 1,483,472,411, should be changed to the timestamp used in the creation of the genesis block. The second number, 184,495,391, should be set to 1 because there is only the genesis transaction mined at that time. Finally, change the third value to 1.