aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_segwit.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-11-12 18:29:43 +0100
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-11-12 18:29:43 +0100
commita9872e1478af10ca335cca32abd248e87e103c02 (patch)
tree4cc5005debf054d56e729c51fb46685c031544b4 /test/functional/p2p_segwit.py
parentc9dd5c8d6e59e27af98e99d2844d6ead8eec3162 (diff)
downloadbitcoin-a9872e1478af10ca335cca32abd248e87e103c02.tar.xz
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.
Diffstat (limited to 'test/functional/p2p_segwit.py')
-rwxr-xr-xtest/functional/p2p_segwit.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py
index 968fd6fe98..99bf34912f 100755
--- a/test/functional/p2p_segwit.py
+++ b/test/functional/p2p_segwit.py
@@ -790,7 +790,6 @@ class SegWitTest(BitcoinTestFramework):
block_3.vtx[0].vout.append(CTxOut(0, CScript([OP_RETURN, WITNESS_COMMITMENT_HEADER + ser_uint256(2), 10])))
block_3.vtx[0].rehash()
block_3.hashMerkleRoot = block_3.calc_merkle_root()
- block_3.rehash()
block_3.solve()
test_witness_block(self.nodes[0], self.test_node, block_3, accepted=False, reason='bad-witness-merkle-match')
@@ -804,7 +803,6 @@ class SegWitTest(BitcoinTestFramework):
block_3.vtx[0].vout[-1].nValue += 1
block_3.vtx[0].rehash()
block_3.hashMerkleRoot = block_3.calc_merkle_root()
- block_3.rehash()
assert len(block_3.vtx[0].vout) == 4 # 3 OP_returns
block_3.solve()
test_witness_block(self.nodes[0], self.test_node, block_3, accepted=True)