Created
February 6, 2020 16:35
-
-
Save bitbd83/e6232e646729bd7eb821cd138bd56775 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(genesis.GetHash() != uint256("0x")) | |
{ | |
printf("Searching for genesis block...\n"); | |
uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256(); | |
while(uint256(genesis.GetHash()) > hashTarget) | |
{ | |
++genesis.nNonce; | |
if (genesis.nNonce == 0) | |
{ | |
printf("NONCE WRAPPED, incrementing time"); | |
std::cout << std::string("NONCE WRAPPED, incrementing time:\n"); | |
++genesis.nTime; | |
} | |
if (genesis.nNonce % 10000 == 0) | |
{ | |
printf("Mainnet: nonce %08u: hash = %s \n", genesis.nNonce, genesis.GetHash().ToString().c_str()); | |
} | |
} | |
printf("block.nTime = %u \n", genesis.nTime); | |
printf("block.nNonce = %u \n", genesis.nNonce); | |
printf("block.GetHash = %s\n", genesis.GetHash().ToString().c_str()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment