mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-29 07:18:58 +01:00
test: remove unnecessary block rehashing prior to solving
Solving a block involves continously rehashing it, i.e. any extra calls to rehash it before are not necessary and can be dropped.
This commit is contained in:
@@ -1240,7 +1240,6 @@ class TaprootTest(BitcoinTestFramework):
|
||||
block.vtx.append(tx)
|
||||
block.hashMerkleRoot = block.calc_merkle_root()
|
||||
witness and add_witness_commitment(block)
|
||||
block.rehash()
|
||||
block.solve()
|
||||
block_response = node.submitblock(block.serialize().hex())
|
||||
if err_msg is not None:
|
||||
@@ -1488,7 +1487,6 @@ class TaprootTest(BitcoinTestFramework):
|
||||
# Mine a block with the transaction
|
||||
block = create_block(tmpl=self.nodes[1].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS), txlist=[rawtx])
|
||||
add_witness_commitment(block)
|
||||
block.rehash()
|
||||
block.solve()
|
||||
assert_equal(None, self.nodes[1].submitblock(block.serialize().hex()))
|
||||
self.sync_blocks()
|
||||
|
||||
Reference in New Issue
Block a user