diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-11-15 18:29:13 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-11-17 15:45:30 +0100 |
commit | df5d783aef3e5af2d1294fc8ff9470a5dc878325 (patch) | |
tree | 0004a7e5e021e9bc4d989b9c2e4cdc552404fb48 /test/functional/feature_dersig.py | |
parent | ae9df4ef937ef77405f6edd7c13615df7b63446f (diff) | |
download | bitcoin-df5d783aef3e5af2d1294fc8ff9470a5dc878325.tar.xz |
test: refactor: take use of `create_block` txlist parameter
Passing a list of transactions `txlist` to `create_block` appends
them to the block, hence we don't need to do that manually anymore.
The merkle root calculation can also be removed, since this is done
in the end of the helper.
Diffstat (limited to 'test/functional/feature_dersig.py')
-rwxr-xr-x | test/functional/feature_dersig.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py index af92dc8575..b7cb32c842 100755 --- a/test/functional/feature_dersig.py +++ b/test/functional/feature_dersig.py @@ -85,9 +85,7 @@ class BIP66Test(BitcoinTestFramework): tip = self.nodes[0].getbestblockhash() block_time = self.nodes[0].getblockheader(tip)['mediantime'] + 1 - block = create_block(int(tip, 16), create_coinbase(DERSIG_HEIGHT - 1), block_time) - block.vtx.append(spendtx) - block.hashMerkleRoot = block.calc_merkle_root() + block = create_block(int(tip, 16), create_coinbase(DERSIG_HEIGHT - 1), block_time, txlist=[spendtx]) block.solve() assert_equal(self.nodes[0].getblockcount(), DERSIG_HEIGHT - 2) |