Changeset View
Changeset View
Standalone View
Standalone View
qa/rpc-tests/p2p-fullblocktest.py
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | def add_options(self, parser): | ||||
super().add_options(parser) | super().add_options(parser) | ||||
parser.add_option("--runbarelyexpensive", dest="runbarelyexpensive", default=True) | parser.add_option("--runbarelyexpensive", dest="runbarelyexpensive", default=True) | ||||
def run_test(self): | def run_test(self): | ||||
self.test = TestManager(self, self.options.tmpdir) | self.test = TestManager(self, self.options.tmpdir) | ||||
self.test.add_all_connections(self.nodes) | self.test.add_all_connections(self.nodes) | ||||
# Start up network handling in another thread | # Start up network handling in another thread | ||||
NetworkThread().start() | NetworkThread().start() | ||||
# Set the blocksize to legacy cap (1MB) as initial condition | |||||
self.nodes[0].setexcessiveblock(LEGACY_MAX_BLOCK_SIZE) | |||||
self.test.run() | self.test.run() | ||||
def add_transactions_to_block(self, block, tx_list): | def add_transactions_to_block(self, block, tx_list): | ||||
[ tx.rehash() for tx in tx_list ] | [ tx.rehash() for tx in tx_list ] | ||||
block.vtx.extend(tx_list) | block.vtx.extend(tx_list) | ||||
# this is a little handier to use than the version in blocktools.py | # 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])): | ||||
▲ Show 20 Lines • Show All 1,207 Lines • Show Last 20 Lines |