0

I am trying to clone the peercoin code. I have created genesis block correctly. But when I try to pre-mine the coins using generatetoaddress which uses POW, I get the following error

ERROR: GetLastStakeModifier: no generation at genesis block

I looked at the code and it seems that when it calls "GetLastStakeModifier" it can not find a stake modifier in the genesis block since I only have the genesis block.

Should I generate a stakemodifier to genesis block? How to do that? When I run getblock I get the following, which looks like it already have modifierchecksum.

{
  "hash": "00000000595887d63ac6a42cc43f86b8d8b970a24e712a08c96e2b6028b36e7e",
  "confirmations": 1,
  "strippedsize": 222,
  "size": 222,
  "weight": 888,
  "height": 0,
  "version": 1,
  "versionHex": "00000001",
  "merkleroot": "73816201d0ec55dd2c11d16eaf6da93a6444a4f9a415df14cad9f605e8ac8ea7",
  "tx": [
    "73816201d0ec55dd2c11d16eaf6da93a6444a4f9a415df14cad9f605e8ac8ea7"
  ],
  "time": 1670910484,
  "mediantime": 1670910484,
  "nonce": 2250407151,
  "bits": "1d00ffff",
  "difficulty": 1,
  "mint": 0.000000,
  "chainwork": "0000000000000000000000000000000000000000000000000000000000000001",
  "nTx": 1,
  "flags": "proof-of-work",
  "proofhash": "00000000595887d63ac6a42cc43f86b8d8b970a24e712a08c96e2b6028b36e7e",
  "entropybit": 0,
  "modifier": "0000000000000000",
  "modifierchecksum": "e0f05322",
  "blocksignature": ""
}
Mike Szyndel
  • 10,461
  • 10
  • 47
  • 63
Mina
  • 1

0 Answers0