if (false && (block.GetHash() != hashGenesisBlock))
{
printf("Mining genesis\n");
uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256();
while (block.GetHash() > hashTarget)
{
++block.nNonce;
if (block.nNonce == 0)
{
printf("NONCE WRAPPED, incrementing time");
++block.nTime;
}
if (block.nNonce % 10000 == 0) {
printf("nonce %08u: hash = %s \n", block.nNonce, block.GetHash().ToString().c_str());
}
}
}
Hi.
This code does not work on new source.
What variables should be changed to what?
I found only, 'block' should be 'genesis', but about others, I don't know. And CBigNum() does not exist in new source.
And when try to 'make', errors.
---------------
chainparams.cpp: In constructor ‘CMainParams::CMainParams()’:
chainparams.cpp:130:41: error: ‘CBigNum’ was not declared in this scope
uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256(
^
chainparams.cpp:131:37: error: no match for ‘operator>’ (operand types are ‘uint256’ and ‘uint256’)
while (genesis.GetHash() > hashTarget)
^
--------------
Wich source do you use ?