Skip to content

Commit 1a689a2

Browse files
committed
test: fix block tests of invalid_txs
1 parent 35bf3f8 commit 1a689a2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

test/functional/data/invalid_txs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ def get_tx(self):
225225
class InvalidOPIFConstruction(BadTxTemplate):
226226
reject_reason = "mandatory-script-verify-flag-failed (Invalid OP_IF construction)"
227227
expect_disconnect = True
228-
valid_in_block = True
229228

230229
def get_tx(self):
231230
return create_tx_with_script(
@@ -260,7 +259,7 @@ def get_tx(self):
260259
'reject_reason': "disabled opcode",
261260
'expect_disconnect': True,
262261
'get_tx': get_tx,
263-
'valid_in_block' : True
262+
'valid_in_block' : False
264263
})
265264

266265
class NonStandardAndInvalid(BadTxTemplate):

test/functional/feature_block.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ def run_test(self):
153153
for TxTemplate in invalid_txs.iter_all_templates():
154154
template = TxTemplate(spend_tx=attempt_spend_tx)
155155

156+
# belt-and-suspenders checking we won't pass up validating something
157+
# we expect a disconnect from
158+
if template.expect_disconnect:
159+
assert not template.valid_in_block
160+
156161
if template.valid_in_block:
157162
continue
158163

0 commit comments

Comments
 (0)