So I added 2 lines to bitcoin's newest source for validate & create genesis block.
at chainparams.cpp,
genesis = CreateGenesisBlock(1519619579, 44453, 0x1f00ffff, 1, 500 * COIN);
const Consensus::Params& consensusParams = Params().GetConsensus();
while(!CheckProofOfWork(genesis.GetHash(), genesis.nBits, consensusParams)){ ++genesis.nNonce; }
but after compile (by 'make', 'make install'), and run (by './xxxcoind'), following errors.
lee@newlite:~/Desktop/BitcoinEssence/src$ ./bitcoinessenced bitcoinessenced: chainparams.cpp:524: const CChainParams& Params(): Assertion `globalChainParams' failed. Aborted (core dumped)
chainparams.cpp:524 line is,
const CChainParams &Params() {
assert(globalChainParams); // this is 524 line.
return *globalChainParams;
}
Why and how to solve this? Thanks..