mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-13 14:13:52 +02:00
Since #32420, createNewBlock has thrown `bad-cb-length` errors when called at low block heights because `OP_0` padding stopped being added to coinbase transactions. (#32420 did add an `include_dummy_extranonce` option which could bypass this, but it was not exposed to IPC clients.) Fix the problem by padding coinbase transactions with `OP_0` when necessary to produce valid blocks. Additionally this commit stops adding `OP_0` padding to the template `script_sig_prefix` field when `include_dummy_extranonce` is true. This is safe because non-IPC clients don't use this field, and IPC clients could never set the option to true, and are expected to add their own nonces in any case. This also improves documentation about the `script_sig_prefix` field and `getCoinbaseTx` method.
22 KiB
Executable File
22 KiB
Executable File