I am trying to create my own genesis block using the bitcoin source code but my new hashes are not being accepted by the assert statements.
Step 1:
I have changed the pszTimestamp
variable in chainparams.cpp
to generate my own genesis hash.
I have added into the code some print statements to check the genesis hash and merkle root as they are generated from my new pszTimestamp
.
The hashes I have generated are:
MERKLE ROOT:9f46bcd8a56be2b6b022acbcc859b201534c21801b1b73685a69de17ad37665e
GENESIS HASH:cc45935bfeb12faacc8ab2797d2f5507f7eef8a44c597f3622c704cc0af8a648
Step 2:
I have changed the assert
statements below to assert the new hashes on line 131
and line 230
of chainparams.cpp
The Genesis Block assert(consensus.hashGenesisBlock==uint256S("0xcc45935bfeb12faacc8ab2797d2f5507f7eef8a44c597f3622c704cc0af8a648"));
The Merkle Root assert(genesis.hashMerkleRoot==int256S("0x9f46bcd8a56be2b6b022acbcc859b201534c1801b1b73685a69de17ad37665e"));
However…
These assert statements still fail. Why?
I have included the error message below:
bitcoin-qt: chainparams.cpp:230: CTestNetParams::CTestNetParams(): Assertion `consensus.hashGenesisBlock == uint256S("0xcc45935bfeb12faacc8ab2797d2f5507f7eef8a44c597f3622c704cc0af8a648")' failed. Aborted (core dumped)