aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework/util.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2015-12-24 11:58:41 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-01-04 11:58:36 +0100
commitbdd0f9e286e8ad28eb724d076275c3cd1734553f (patch)
treeed738e1d51e0d7d928884a24e3b158c685c37c32 /qa/rpc-tests/test_framework/util.py
parentf6c8c1242b34eafdbee912544a071d2b58484ea8 (diff)
downloadbitcoin-bdd0f9e286e8ad28eb724d076275c3cd1734553f.tar.xz
[qa] Move gen_return_txouts() to util.py
Github-Pull: #7250 Rebased-From: fa0a9749eb09f6b537b98075241a7fcb46f758e3
Diffstat (limited to 'qa/rpc-tests/test_framework/util.py')
-rw-r--r--qa/rpc-tests/test_framework/util.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py
index 313d1b62b3..457a89a2b2 100644
--- a/qa/rpc-tests/test_framework/util.py
+++ b/qa/rpc-tests/test_framework/util.py
@@ -437,6 +437,24 @@ def create_confirmed_utxos(fee, node, count):
assert(len(utxos) >= count)
return utxos
+def gen_return_txouts():
+ # Some pre-processing to create a bunch of OP_RETURN txouts to insert into transactions we create
+ # So we have big transactions (and therefore can't fit very many into each block)
+ # create one script_pubkey
+ script_pubkey = "6a4d0200" #OP_RETURN OP_PUSH2 512 bytes
+ for i in xrange (512):
+ script_pubkey = script_pubkey + "01"
+ # concatenate 128 txouts of above script_pubkey which we'll insert before the txout for change
+ txouts = "81"
+ for k in xrange(128):
+ # add txout value
+ txouts = txouts + "0000000000000000"
+ # add length of script_pubkey
+ txouts = txouts + "fd0402"
+ # add script_pubkey
+ txouts = txouts + script_pubkey
+ return txouts
+
def create_lots_of_big_transactions(node, txouts, utxos, fee):
addr = node.getnewaddress()
txids = []