Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/p2p.py
Show First 20 Lines • Show All 558 Lines • ▼ Show 20 Lines | def wait_for_inv(self, expected_inv, timeout=60): | ||||
self.last_message["inv"].inv[0].hash == expected_inv[0].hash | self.last_message["inv"].inv[0].hash == expected_inv[0].hash | ||||
self.wait_until(test_function, timeout=timeout) | self.wait_until(test_function, timeout=timeout) | ||||
def wait_for_verack(self, timeout=60): | def wait_for_verack(self, timeout=60): | ||||
def test_function(): | def test_function(): | ||||
return "verack" in self.last_message | return "verack" in self.last_message | ||||
self.wait_until(test_function, timeout=timeout, check_connected=False) | self.wait_until(test_function, timeout=timeout) | ||||
# Message sending helper functions | # Message sending helper functions | ||||
def send_and_ping(self, message, timeout=60): | def send_and_ping(self, message, timeout=60): | ||||
self.send_message(message) | self.send_message(message) | ||||
self.sync_with_ping(timeout=timeout) | self.sync_with_ping(timeout=timeout) | ||||
# Sync up with the node | # Sync up with the node | ||||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |