Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc_p2p_compactblocks.py
Show First 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
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 | ||||
# Wait for SENDCMPCT | # Wait for SENDCMPCT | ||||
def received_sendcmpct(): | def received_sendcmpct(): | ||||
return (test_p2p.last_sendcmpct is not None) | return (test_p2p.last_sendcmpct is not None) | ||||
self.wait_until(received_sendcmpct, timeout=30) | self.wait_until(received_sendcmpct, timeout=30) | ||||
sendcmpct = msg_sendcmpct() | test_p2p.send_and_ping(msg_sendcmpct(announce=True, version=1)) | ||||
sendcmpct.version = 1 | |||||
sendcmpct.announce = True | |||||
test_p2p.send_and_ping(sendcmpct) | |||||
# Exchange headers | # Exchange headers | ||||
def received_getheaders(): | def received_getheaders(): | ||||
return (test_p2p.last_getheaders is not None) | return (test_p2p.last_getheaders is not None) | ||||
self.wait_until(received_getheaders, timeout=30) | self.wait_until(received_getheaders, timeout=30) | ||||
# Return the favor | # Return the favor | ||||
test_p2p.send_message(test_p2p.last_getheaders) | test_p2p.send_message(test_p2p.last_getheaders) | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |