Ok so im cloning BitcoinGreen... It uses Quark Algorithm. The way I generate the genesis block & MerkleRoot is by pasting the code on the chainparams.cpp which is this..
printf("genesis.GetHash = %s\n", genesis.GetHash().ToString().c_str());
printf("Gensis Hash Merkle: %s\n", genesis.hashMerkleRoot.ToString().c_str());
Even tho this gave me the code to the genesis block, it did not generate the correct code for the coin. I even use this special code, which generate the genesis block as well...
const int SCRYPT_SCRATCHPAD_SIZE = 131072 + 63;
//if (true && genesis.GetHash() != hashGenesisBlock)
if(true)
{
printf("Searching for genesis block...\n");
// This will figure out a valid hash and Nonce if you're
// creating a different genesis block:
uint256 hashTarget = CBigNum().SetCompact(genesis.nBits).getuint256();
uint256 thash;
char scratchpad[SCRYPT_SCRATCHPAD_SIZE];
while(true)
{
scrypt_1024_1_1_256_sp_generic(BEGIN(genesis.nVersion), BEGIN(thash), scratchpad);
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("block.nTime = %u \n", genesis.nTime);
printf("block.nNonce = %u \n", genesis.nNonce);
printf("block.GetHash = %s\n", genesis.GetHash().ToString().c_str());
}
This also did not work. So thats pretty much it. I tried.