I've cloned PIVX(basically a DASH fork) and modified basic parameters. It compiles fine. When I'm trying to run it the server starts and the debug log file shows following errors:
ERROR: CheckProofOfWork() : hash doesn't match nBits
ERROR: CheckBlockHeader() : proof of work failed
ERROR: CheckBlock() : CheckBlockHeader failed
To generate my genesis block I've changed the following parameters:
- pszTimestamp : Used a random latest news.
- vAlertPubKey : Used the alert key from generation commands mentioned in this pastebin link.
scriptPubKey : Used the genesis hex from generation commands mentioned in this pastebin link.
genesis.nTime : Got the latest unix timestamp.
- genesis.nNonce : Obtained it from genesis block creation algorithm mentioned in this pastebin link.
I was able to successfully generate new genesis hash as well as merkle root. But after compiling it and I get the above error.
I've tried looking for the solution on the web but most of them had no concrete answers or no answers at all except this one.
It explains that the hash of my genesis block is greater than the target hash which is obtained using
nBits variable. So my question is how do I make sure that my genesis hash is less than the target hash to get rid of the errors mentioned?