Title: How to set block.nBits in Genesis block Post by: BC.NXT on April 03, 2014, 04:05:28 PM Hello,
Is any one encounter a problem below after change Litecoin's "block.nTime". 2014-04-03 15:53:46 Pre-allocating up to position 0x1000000 in blk00000.dat 2014-04-03 15:53:46 ERROR: CheckProofOfWork() : hash doesn't match nBits 2014-04-03 15:53:46 ERROR: CBlock::ReadFromDisk() : errors in block header 2014-04-03 15:53:46 *** Failed to read block I check the error part in source code is this: bool CheckProofOfWork(uint256 hash, unsigned int nBits) { CBigNum bnTarget; bnTarget.SetCompact(nBits); // Check range if (bnTarget <= 0 || bnTarget > bnProofOfWorkLimit) return error("CheckProofOfWork() : nBits below minimum work"); // Check proof of work matches claimed amount if (hash > bnTarget.getuint256()) return error("CheckProofOfWork() : hash doesn't match nBits"); return true; } any one can help me to solve this genesis block problem. Title: Re: How to set block.nBits in Genesis block Post by: elbandi on April 03, 2014, 07:40:03 PM Here (https://bitcointalk.org/index.php?topic=391983.msg4223449#msg4223449) is my tutorial.
Title: Re: How to set block.nBits in Genesis block Post by: elbandi on April 07, 2014, 04:08:25 PM Here is the code:
Code: // If genesis block hash does not match, then generate new genesis hash. Title: Re: How to set block.nBits in Genesis block Post by: IluminumProject on May 22, 2018, 06:48:56 PM Yes this helps to fix the problem thanks
|