Skip to content

Commit a4cd1d6

Browse files
committed
fix: explicitly test no tx in mempool after invalidateblock
1 parent 04b5db9 commit a4cd1d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/functional/feature_dip0020_activation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def run_test(self):
6868
tx0.vout.append(CTxOut(value, CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE])))
6969
tx0.rehash()
7070
tx0_hex = tx0.serialize().hex()
71+
tx0id = node.decoderawtransaction(tx0_hex)["txid"]
7172

7273
# flush state to disk before potential crashes below
7374
self.nodes[0].gettxoutsetinfo()
@@ -118,10 +119,11 @@ def run_test(self):
118119
node.invalidateblock(node.getbestblockhash())
119120
except:
120121
self.start_node(0)
122+
assert tx0id not in set(node.getrawmempool())
121123
node.generate(1)
122124

123125
self.log.info("Transactions spending coins with new opcodes are accepted one block after DIP0020 activation block")
124-
tx0id = node.sendrawtransaction(tx0_hex)
126+
node.sendrawtransaction(tx0_hex)
125127
assert tx0id in set(node.getrawmempool())
126128

127129

0 commit comments

Comments
 (0)