Problem In Creating Genesis Block Twister-Core using Ubuntu and (Qt Creator IDE) I am trying to create a genesis block in twister-core using Ubuntu and IDE Qt Creator. I have compiled the twister-core successfully, I have changed the these parameters for creating the genesis block pszTimestamp, genesis.nTime   and  genesis.nNonce. Then I re-compiled it successfully. When I am executing twisterd in the terminal using this command 

./twisterd -rpcuser=user -rpcpassword=pwd -rpcallowip=127.0.0.1


this error occured:


  Terminal Error :
  Assertion `hashGenesisBlock == uint256("b24b7a9c568b4ae288c0be34699c4c79fc22848e7c346afd5f63901e41ed8640")' failed.
  Aborted (core dumped)


When I run it On Qt-Creator same error occur Error:


  twisterd: ../twister/src/chainparams.cpp:216: CMainParams::CMainParams(): Assertion `hashGenesisBlock == uint256("b24b7a9c568b4ae288c0be34699c4c79fc22848e7c346afd5f63901e41ed8640")' failed.
  The program has unexpectedly finished.
  ../twister-qt-Output/twisterd exited with code 0


Please help me to resolve this problem.
chainparams.cpp contains a line of code that checks whether the chain’s genesis block is equal to a specified hash. Since you created a new genesis block, you will have to update the value to your own hash.

You can see an example for the line here: 

 hashGenesisBlock = genesis.GetHash();
 assert(hashGenesisBlock == uint256("9915158279673d101912be80f25c20627f1dd8bf5231e7c46bfec5ed19737f44"));


Which I took from miguelfreitas/twister-core/…/chainparams.cpp

To figure out what to put there, you can print genesis.GetHash() and replace the old hash in the assertion.

To print it the hash of the genesis block, you can use

printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());


just above the line with the assertion, which will write to the ~/.bitcoin/debug.log.