|
|
@ -84,22 +84,7 @@ class TestNode(NodeConnCB): |
|
|
|
class MaxUploadTest(BitcoinTestFramework): |
|
|
|
class MaxUploadTest(BitcoinTestFramework): |
|
|
|
def __init__(self): |
|
|
|
def __init__(self): |
|
|
|
self.utxo = [] |
|
|
|
self.utxo = [] |
|
|
|
|
|
|
|
self.txouts = 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 full blocks to fill up our block files |
|
|
|
|
|
|
|
# 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 |
|
|
|
|
|
|
|
self.txouts = "81" |
|
|
|
|
|
|
|
for k in xrange(128): |
|
|
|
|
|
|
|
# add txout value |
|
|
|
|
|
|
|
self.txouts = self.txouts + "0000000000000000" |
|
|
|
|
|
|
|
# add length of script_pubkey |
|
|
|
|
|
|
|
self.txouts = self.txouts + "fd0402" |
|
|
|
|
|
|
|
# add script_pubkey |
|
|
|
|
|
|
|
self.txouts = self.txouts + script_pubkey |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def add_options(self, parser): |
|
|
|
def add_options(self, parser): |
|
|
|
parser.add_option("--testbinary", dest="testbinary", |
|
|
|
parser.add_option("--testbinary", dest="testbinary", |
|
|
|