Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-p2p-compactblocks.py
Show First 20 Lines • Show All 292 Lines • ▼ Show 20 Lines | def get_tests(self): | ||||
for i in range(100): | for i in range(100): | ||||
out.append(get_spendable_output()) | out.append(get_spendable_output()) | ||||
# Check that compact block also work for big blocks | # Check that compact block also work for big blocks | ||||
node = self.nodes[0] | node = self.nodes[0] | ||||
peer = TestNode() | peer = TestNode() | ||||
peer.add_connection(NodeConn('127.0.0.1', p2p_port(0), node, peer)) | peer.add_connection(NodeConn('127.0.0.1', p2p_port(0), node, peer)) | ||||
# Start up network handling in another thread and wait for connection | # Wait for connection to be etablished | ||||
# to be etablished | |||||
NetworkThread().start() | |||||
peer.wait_for_verack() | peer.wait_for_verack() | ||||
# Wait for SENDCMPCT | # Wait for SENDCMPCT | ||||
def received_sendcmpct(): | def received_sendcmpct(): | ||||
return (peer.last_sendcmpct != None) | return (peer.last_sendcmpct != None) | ||||
wait_until(received_sendcmpct, timeout=30) | wait_until(received_sendcmpct, timeout=30) | ||||
sendcmpct = msg_sendcmpct() | sendcmpct = msg_sendcmpct() | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |