qa: Pad scriptPubKeys to get minimum sized txs

This commit is contained in:
MarcoFalke
2018-05-03 16:50:25 -04:00
committed by Johnson Lau
parent 7485488e90
commit 364bae5f7a
7 changed files with 48 additions and 45 deletions

View File

@ -32,6 +32,7 @@ from test_framework.script import (
OP_ELSE,
OP_ENDIF,
OP_EQUAL,
OP_DROP,
OP_FALSE,
OP_HASH160,
OP_IF,
@ -1215,7 +1216,7 @@ class FullBlockTest(BitcoinTestFramework):
block.vtx.extend(tx_list)
# this is a little handier to use than the version in blocktools.py
def create_tx(self, spend_tx, n, value, script=CScript([OP_TRUE])):
def create_tx(self, spend_tx, n, value, script=CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE])):
return create_transaction(spend_tx, n, b"", value, script)
# sign a transaction, using the key we know about