Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_p2p_compactblocks.py
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | def next_block(self, number, spend=None, script=CScript( | ||||
self.blocks[number] = block | self.blocks[number] = block | ||||
return block | return block | ||||
def run_test(self): | def run_test(self): | ||||
node = self.nodes[0] | node = self.nodes[0] | ||||
default_p2p = node.add_p2p_connection(P2PDataStore()) | default_p2p = node.add_p2p_connection(P2PDataStore()) | ||||
test_p2p = node.add_p2p_connection(TestP2PConn()) | test_p2p = node.add_p2p_connection(TestP2PConn()) | ||||
# Set the blocksize to 2MB as initial condition | |||||
node.setexcessiveblock(self.excessive_block_size) | |||||
self.genesis_hash = int(node.getbestblockhash(), 16) | self.genesis_hash = int(node.getbestblockhash(), 16) | ||||
self.block_heights[self.genesis_hash] = 0 | self.block_heights[self.genesis_hash] = 0 | ||||
spendable_outputs = [] | spendable_outputs = [] | ||||
# save the current tip so it can be spent by a later block | # save the current tip so it can be spent by a later block | ||||
def save_spendable_output(): | def save_spendable_output(): | ||||
spendable_outputs.append(self.tip) | spendable_outputs.append(self.tip) | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |