Closed SzhenBBK closed 5 years ago
i find a genesis block using this:
`if (true && genesis.GetHash() != hashGenesisBlock) { printf("Searching for genesis block...\n"); uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256(); uint256 thash;
while (true)
{
thash = genesis.GetHash();
if (thash <= hashTarget)
break;
if ((genesis.nNonce & 0xFFF) == 0)
{
printf("nonce %08X: hash = %s (target = %s)\n", genesis.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str());
}
++genesis.nNonce;
if (genesis.nNonce == 0)
{
printf("NONCE WRAPPED, incrementing time\n");
++genesis.nTime;
}
}
printf("genesis.nTime = %u \n", genesis.nTime);
printf("genesis.nNonce = %u \n", genesis.nNonce);
printf("genesis.nVersion = %u \n", genesis.nVersion);
printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str()); //first this, then comment this line out and uncomment the one under.
printf("genesis.hashMerkleRoot = %s \n", genesis.hashMerkleRoot.ToString().c_str()); //improvised. worked for me, to find merkle root
}
`
Hi, I'm a student in the area and I'm trying to make an embercoin fork. but I can not generate a new genesis block
Error:
chainparams.cpp:87: CMainParams::CMainParams(): Assertion hashGenesisBlock == uint256("")'
Params: ` class CMainParams : public CChainParams { public: CMainParams() { // The message start string is designed to be unlikely to occur in normal data. // The characters are rarely used upper ASCII, not valid as UTF-8, and produce // a large 4-byte int at any alignment. pchMessageStart[0] = 0xef; pchMessageStart[1] = 0xc9; pchMessageStart[2] = 0x65; pchMessageStart[3] = 0x7c; vAlertPubKey = ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f"); nDefaultPort = 10024; nRPCPort = 10022; bnProofOfWorkLimit = CBigNum(~uint256(0) >> 20); bnProofOfStakeLimit = CBigNum(~uint256(0) >> 20);
`
I tried using genesisH0 to generate a new genesis but I could not
Can someone help me please?