mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 16:24:48 +02:00
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.
This commit is contained in:
@@ -388,9 +388,7 @@ class BIP68Test(BitcoinTestFramework):
|
||||
assert_raises_rpc_error(-26, NOT_FINAL_ERROR, self.nodes[0].sendrawtransaction, tx3.serialize().hex())
|
||||
|
||||
# make a block that violates bip68; ensure that the tip updates
|
||||
block = create_block(tmpl=self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS))
|
||||
block.vtx.extend([tx1, tx2, tx3])
|
||||
block.hashMerkleRoot = block.calc_merkle_root()
|
||||
block = create_block(tmpl=self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS), txlist=[tx1, tx2, tx3])
|
||||
add_witness_commitment(block)
|
||||
block.solve()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user