diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-04-26 07:26:46 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-04-26 07:27:18 -0400 |
commit | 653b2b4426cf762f90707c27c3f435142c911ab6 (patch) | |
tree | 144dc01e1212721dc6be7291d3ff33c8dac84eb6 /test/functional/data/invalid_txs.py | |
parent | c65c77c721b69f1782509145d62978d31c9a1d78 (diff) | |
parent | cc556e4a30b4a32eab6722f590489d89b2875de3 (diff) | |
download | bitcoin-653b2b4426cf762f90707c27c3f435142c911ab6.tar.xz |
Merge #15893: Add test for superfluous witness record in deserialization
cc556e4a30 Add test for superfluous witness record in deserialization (Gregory Sanders)
25b0786581 Fix missing input template by making minimal tx (Gregory Sanders)
Pull request description:
Adds coverage for changed behavior in https://github.com/bitcoin/bitcoin/pull/14039
ACKs for commit cc556e:
MarcoFalke:
utACK cc556e4a30b4a32eab6722f590489d89b2875de3
Tree-SHA512: 3404c8f75e87503983fac5ae27d877309eb3b902f2ec993762911c71610ca449bef0ed98bd17e029414828025b2713e1bd012e63b2a06497e34f1056acaa6321
Diffstat (limited to 'test/functional/data/invalid_txs.py')
-rw-r--r-- | test/functional/data/invalid_txs.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/data/invalid_txs.py b/test/functional/data/invalid_txs.py index 02deae92f3..d262dae5aa 100644 --- a/test/functional/data/invalid_txs.py +++ b/test/functional/data/invalid_txs.py @@ -71,9 +71,13 @@ class InputMissing(BadTxTemplate): reject_reason = "bad-txns-vin-empty" expect_disconnect = False + # We use a blank transaction here to make sure + # it is interpreted as a non-witness transaction. + # Otherwise the transaction will fail the + # "surpufluous witness" check during deserialization + # rather than the input count check. def get_tx(self): tx = CTransaction() - tx.vout.append(CTxOut(0, sc.CScript([sc.OP_TRUE] * 100))) tx.calc_sha256() return tx |