bad_cb_height in regtest in every block

I'm having a problem trying to generate blocks for Regtest. I get always an error:

ERROR: AcceptBlock: bad-cb-height, block height mismatch in coinbase

The height of the block I'm trying to mine is 1. So the Coinbase transaction I'm using is:

02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff3f01013c8cb3d83abd14588177040029eb9bf1bf952f1f43af61e6df03578d5e3bb261a8e2a4bb1bb2da4bc180d3fc67bd1c73aac0575e280239c2f30dc3acb0000000000100f2052a010000001976a914bf01aa10263be4a8f6cabbdd60a74c7544e48d2a88ac00000000

whose parts are:

02000000

01

0000000000000000000000000000000000000000000000000000000000000000

ffffffff

3f (<- This is the size of the scriptsig (63))

0101 (<- This is the height. Its value is 1 and it is using 1 byte)

3c8cb3d83abd14588177040029eb9bf1bf952f1f43af61e6df03578d5e3bb261a8e2a4bb1bb2da4bc180d3fc67bd1c73aac0575e280239c2f30dc3acb (<- And I add 60 (3c) random bytes)

000000000 (<- The sequence)

01 (<- One transaction which is the Coinbase)

00f2052a01000000 (<- The amount of Satoshis)

1976a914bf01aa10263be4a8f6cabbdd60a74c7544e48d2a88ac (The ScriptPubKey)

00000000 (The locktime)

I don't see what is the problem with the height value. Someone knows? Thanks



from Recent Questions - Bitcoin Stack Exchange https://ift.tt/dk9SWh7
via IFTTT

Popular posts from this blog

Future of Bitcoin encryption and security in a QC era

Possible rollback due to lazy reveal in BRC20?

A way to recover scammed Bitcoin investment