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

New nonce, epoch time, and nbits

We have to locate the following line in chainparams.cpp in the three classes CMainParams, CTestNetParams and CRegTestParams:

genesis = CreateGenesisBlock(time, nonce, bits, 1, 10 * COIN);

In the order, change the arguments of the CreateGenesisBlock function using the values computed previously by the GenesisH0 script as follows:

genesis = CreateGenesisBlock(1529321830, 490987, 0x1e0ffff0, 1, 10 * COIN);

The argument in the function is the initial reward (10 Readercoins) for generating the genesis block.