aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_compactblocks.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-05-03 16:50:25 -0400
committerJohnson Lau <jl2012@xbt.hk>2018-05-05 04:59:55 +0800
commit364bae5f7a6b16eef63990154e48f19e7e693039 (patch)
tree0ef3fde608d5bd41a3cdc6ccc7285ba58354218f /test/functional/p2p_compactblocks.py
parent7485488e907e236133a016ba7064c89bf9ab6da3 (diff)
downloadbitcoin-364bae5f7a6b16eef63990154e48f19e7e693039.tar.xz
qa: Pad scriptPubKeys to get minimum sized txs
Diffstat (limited to 'test/functional/p2p_compactblocks.py')
-rwxr-xr-xtest/functional/p2p_compactblocks.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/p2p_compactblocks.py b/test/functional/p2p_compactblocks.py
index 1657d97281..cb4c9867a3 100755
--- a/test/functional/p2p_compactblocks.py
+++ b/test/functional/p2p_compactblocks.py
@@ -12,7 +12,8 @@ from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment
-from test_framework.script import CScript, OP_TRUE
+from test_framework.script import CScript, OP_TRUE, OP_DROP
+
# TestP2PConn: A peer we use to send messages to bitcoind, and store responses.
class TestP2PConn(P2PInterface):
@@ -423,7 +424,7 @@ class CompactBlocksTest(BitcoinTestFramework):
for i in range(num_transactions):
tx = CTransaction()
tx.vin.append(CTxIn(COutPoint(utxo[0], utxo[1]), b''))
- tx.vout.append(CTxOut(utxo[2] - 1000, CScript([OP_TRUE])))
+ tx.vout.append(CTxOut(utxo[2] - 1000, CScript([OP_TRUE, OP_DROP] * 15 + [OP_TRUE])))
tx.rehash()
utxo = [tx.sha256, 0, tx.vout[0].nValue]
block.vtx.append(tx)