PeerCoin – Altcoin Creation, cant get genesis block

Hi we are developing an altcoin from Peercoin which is an x11 based coin. The merkle generates just fine. But when I recompile and load the daemon it says Genesis Block can not be created.

I tried adding

if (true && block.GetHash() != hashGenesisBlock) { 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(block.nBits).getuint256(); uint256 thash; char scratchpad[SCRYPT_SCRATCHPAD_SIZE]; loop { #if defined(USE_SSE2) // Detection would work, but in cases where we KNOW it always has SSE2, // it is faster to use directly than to use a function pointer or conditional. #if defined(_M_X64) || defined(__x86_64__) || defined(_M_AMD64) || (defined(MAC_OSX) && defined(__i386__)) // Always SSE2: x86_64 or Intel MacOS X scrypt_1024_1_1_256_sp_sse2(BEGIN(block.nVersion), BEGIN(thash), scratchpad); #else // Detect SSE2: 32bit x86 Linux or Windows scrypt_1024_1_1_256_sp(BEGIN(block.nVersion), BEGIN(thash), scratchpad); #endif #else // Generic scrypt scrypt_1024_1_1_256_sp_generic(BEGIN(block.nVersion), BEGIN(thash), scratchpad); #endif if (thash <= hashTarget) break; if ((block.nNonce & 0xFFF) == 0) { printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str()); } ++block.nNonce; if (block.nNonce == 0) { printf("NONCE WRAPPED, incrementing time\n"); ++block.nTime; } } printf("block.nTime = %u \n", block.nTime); printf("block.nNonce = %u \n", block.nNonce); printf("block.GetHash = %s\n", block.GetHash().ToString().c_str()); } 

But then the make wouldnt complete, it returned scrypt_scratchpad is undefined, error 1.

Then I removed the entire code and I get main.cpp:2372: bool LoadBlockIndex(bool): Assertion `block.GetHash() == hashGenesisBlock’ failed.

Line 2372 is assert(block.GetHash() == hashGenesisBlock);

I dont know what the problem is, can some please help?

Recent Questions – Bitcoin Stack Exchange

What’s the easiest to use block chain token that allows the creation and trade of custom assets?

I want to develop a block chain based app, and I’m looking at using counterparty assets. But, my concern is that inorder to obtain said asset, one has to first purchase Bitcoin, then turn that into Counterparty inorder to buy the asset. That’s way too complicated for the average Joe if you ask me. So I’m looking for a simple way to issue a token that can be either purchased directly with Fiat, or with Bitcoin directly not through a 3rd party coin. Any suggestions?

Recent Questions – Bitcoin Stack Exchange