mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Fix missing input template by making minimal tx
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user