diff options
author | Antoine Poinsot <darosior@protonmail.com> | 2024-10-16 13:34:15 +0100 |
---|---|---|
committer | dergoegge <n.goeggi@gmail.com> | 2024-10-17 10:58:42 +0100 |
commit | 86e2a6b749c7fecbd086b361806ac9f6e9426d79 (patch) | |
tree | 4f98ce553dce71b2b84a1b6c7c59cb9655b48ba0 /test/functional/data/invalid_txs.py | |
parent | f859ff8a4e9c3aa23bf5be6eceb7099ca72b2290 (diff) |
[test] A non-standard transaction which is also consensus-invalid should return the consensus error
Diffstat (limited to 'test/functional/data/invalid_txs.py')
-rw-r--r-- | test/functional/data/invalid_txs.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/functional/data/invalid_txs.py b/test/functional/data/invalid_txs.py index 2e4ca83bf0..d2d7202d86 100644 --- a/test/functional/data/invalid_txs.py +++ b/test/functional/data/invalid_txs.py @@ -263,6 +263,17 @@ def getDisabledOpcodeTemplate(opcode): 'valid_in_block' : True }) +class NonStandardAndInvalid(BadTxTemplate): + """A non-standard transaction which is also consensus-invalid should return the consensus error.""" + reject_reason = "mandatory-script-verify-flag-failed (OP_RETURN was encountered)" + expect_disconnect = True + valid_in_block = False + + def get_tx(self): + return create_tx_with_script( + self.spend_tx, 0, script_sig=b'\x00' * 3 + b'\xab\x6a', + amount=(self.spend_avail // 2)) + # Disabled opcode tx templates (CVE-2010-5137) DisabledOpcodeTemplates = [getDisabledOpcodeTemplate(opcode) for opcode in [ OP_CAT, |