I have created an altcoin, based on litecoin 0.8 code.
NOTE: This post is similar to something posted by another user, but this is a new post, as I am having a similar problem generating a usable genesis block.
I've already modified the code and it compiles successfully and runs. However, I am getting fatal run-time errors.
Much of the seemingly relevant advice available on this site for generating a genesis block seems to be based on an obsolete branch of litecoin, so it may not be applicable.
In any case, these are the errors I'm getting in debug.log:
2013-12-26 19:08:39 CBlock(hash=132d04036cafebec545ba2cf4bf4a315a34c4ab45003f9b4586111eefaf33c16, input=01000000000000000000000000000000000000000000000000000000000000000000000020d4a427a866d0162dbe6b9d7459bdd67ec9631f8e322dcf5755ea310878bda48d7fbb52f0ff0f1e00000000, PoW=e8b3313f59ac0c1b6645838c72df2bf45930fcbe91218d0993dd5f26d4bb0112, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=a4bd780831ea5557cf2d328e1f63c97ed6bd59749d6bbe2d16d066a827a4d420, nTime=1388019597, nBits=1e0ffff0, nNonce=0, vtx=1)
2013-12-26 19:08:39 CTransaction(hash=a4bd780831ea5557cf2d328e1f63c97ed6bd59749d6bbe2d16d066a827a4d420, ver=1, vin.size=1, vout.size=1, nLockTime=0)
CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d01044c5d4e592054696d65732032342f4465632f3230313320416c616e20547572696e672c20456e69676d6120436f64652d427265616b657220616e6420436f6d70757465722050696f6e6565722c2057696e7320526f79616c20506172646f6e)
CTxOut(nValue=50.00000000, scriptPubKey=040184710fa689ad5023690c80f3a4)
vMerkleTree: a4bd780831ea5557cf2d328e1f63c97ed6bd59749d6bbe2d16d066a827a4d420
2013-12-26 19:08:39 Pre-allocating up to position 0x1000000 in blk00000.dat
2013-12-26 19:08:40 ERROR: CheckProofOfWork() : hash doesn't match nBits
2013-12-26 19:08:40 ERROR: CBlock::ReadFromDisk() : errors in block header
2013-12-26 19:08:40 *** Failed to read block
2013-12-26 19:08:40 Error: Failed to read block
2013-12-26 19:08:40 ERROR: LoadBlockIndex() : genesis block not accepted
2013-12-26 19:08:40 : Error initializing block database.
And I get the following output from the client:
Error: Failed to read block
: Error initializing block database.
Do you want to rebuild the block database now?
To collect the bounty I need you to:
1.) Get the client to successfully create a genesis block and then run without giving errors.
3.) Send me back the required code changes, so I can learn from my mistakes and see what I should have done.
Send me a private message if you accept this new challenge.
I'll provide you with a zip file with the full code in it.
I'll pay in BTC (or PayPal USD if you want)