Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-p2p-compactblocks.py
Show First 20 Lines • Show All 220 Lines • ▼ Show 20 Lines | def next_block(self, number, spend=None, script=CScript([OP_TRUE]), block_size=0, extra_txns=0): | ||||
assert number not in self.blocks | assert number not in self.blocks | ||||
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()) | ||||
default_p2p.wait_for_verack() | |||||
test_p2p.wait_for_verack() | |||||
# Set the blocksize to 2MB as initial condition | # Set the blocksize to 2MB as initial condition | ||||
node.setexcessiveblock(self.excessive_block_size) | 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 = [] | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |