aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-11-22 10:55:19 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-11-22 10:55:30 +0100
commit3a36ec83d024a1343bee8e390833eb1fd7a3705d (patch)
tree02e4af4d8e7d7210e43a34a66fe147767bdbdb5d /src
parent47fe7445e7f54aee10ec6dbc53f1db1adbeb43de (diff)
parente57c0eb865b4ce155b5a4a2e56e46791a47e85af (diff)
downloadbitcoin-3a36ec83d024a1343bee8e390833eb1fd7a3705d.tar.xz
Merge bitcoin/bitcoin#23521: test: refactor: dedup code by taking use of `create_block` parameters
e57c0eb865b4ce155b5a4a2e56e46791a47e85af test: refactor: replace OP_1/OP_TRUE magic numbers by constants (Sebastian Falbesoner) df5d783aef3e5af2d1294fc8ff9470a5dc878325 test: refactor: take use of `create_block` txlist parameter (Sebastian Falbesoner) ae9df4ef937ef77405f6edd7c13615df7b63446f test: refactor: take use of `create_block` version parameter (or use default) (Sebastian Falbesoner) Pull request description: The helper `create_block` offers two parameters `version` and `txlist` which set the `nVersion` field / extend the `vtx` array of the block, respectively. By taking use of those, we can remove a lot of code, including the recalculation of the merkle root. Both passing txs in string and `CTransaction` format is supported, i.e. we also save potential calls to `tx_from_hex`. The PR also contains another commit which replaces magic numbers for OP_TRUE/OP_1 (0x51) with the proper constant from the `script` module. Instances setting the block version of 4 explicitely after calling `create_block` are removed, as this is the default since #16333 got merged (see https://github.com/bitcoin/bitcoin/pull/23521#discussion_r751173671). ACKs for top commit: stratospher: tested ACK e57c0eb. Tree-SHA512: a56965168d36b40b84e7f334b00472b82c31e8482c9e2651c97a791abd7fee3b40ca15e943a7acafa3acf172066fdace38bb13240084b789fd6ff4f6e510e23a
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions