Code to mine genesis block, throwing out errors

Code to mine genesis block, throwing out errors

I'm following : http://dillingers.com/blog/2015/04/18/how-to-make-an-altcoin/

and when i put the following code :

hashGenesisBlock = uint256("0x01");
  if (true && genesis.GetHash() != hashGenesisBlock);
    (
        Logprintf("recalculating params for mainnet.\n");
        Logprintf("old mainnet genesis nonce: %s\n", genesis.nNonce.ToString().c_str());
        Logprintf("old mainnet genesis hash:  %s\n", hashGenesisBlock.ToString().c_str());
        // deliberately empty for loop finds nonce value.
        for(genesis.nNonce == 0; genesis.GetHash() > bnProofOfWorkLimit; genesis.nNonce++){ }; 
        Logprintf("new mainnet genesis merkle root: %s\n", genesis.hashMerkleRoot.ToString().c_str());
        Logprintf("new mainnet genesis nonce: %s\n", genesis.nNonce.ToString().c_str());
        Logprintf("new mainnet genesis hash: %s\n", genesis.GetHash().ToString().c_str());
    ));

It just throws out errors during compiling : https://pastebin.com/3pbbu1iv

I'm on a linux x64 (Ubuntu 16.04)

http://ift.tt/2BBmBKg

Comments

Popular posts from this blog

bitcoin node: what is the difference between simnet and regtest?

How to check if Electrum is masking my IP with the Tor proxy?

How generic miner connects to bitcoin or ethereum network and does it needs to store entire blockchain?