aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_assumevalid.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-11-15 18:29:13 +0100
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-11-17 15:45:30 +0100
commitdf5d783aef3e5af2d1294fc8ff9470a5dc878325 (patch)
tree0004a7e5e021e9bc4d989b9c2e4cdc552404fb48 /test/functional/feature_assumevalid.py
parentae9df4ef937ef77405f6edd7c13615df7b63446f (diff)
downloadbitcoin-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_assumevalid.py')
-rwxr-xr-xtest/functional/feature_assumevalid.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/functional/feature_assumevalid.py b/test/functional/feature_assumevalid.py
index da9655ced6..67cacaa9ce 100755
--- a/test/functional/feature_assumevalid.py
+++ b/test/functional/feature_assumevalid.py
@@ -122,10 +122,8 @@ class AssumeValidTest(BitcoinTestFramework):
tx.vout.append(CTxOut(49 * 100000000, CScript([OP_TRUE])))
tx.calc_sha256()
- block102 = create_block(self.tip, create_coinbase(height), self.block_time)
+ block102 = create_block(self.tip, create_coinbase(height), self.block_time, txlist=[tx])
self.block_time += 1
- block102.vtx.extend([tx])
- block102.hashMerkleRoot = block102.calc_merkle_root()
block102.solve()
self.blocks.append(block102)
self.tip = block102.sha256