Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_sendheaders.py
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | def mine_reorg(self, length): | ||||
return [int(x, 16) for x in all_hashes] | return [int(x, 16) for x in all_hashes] | ||||
def run_test(self): | def run_test(self): | ||||
# Setup the p2p connections | # Setup the p2p connections | ||||
inv_node = self.nodes[0].add_p2p_connection(BaseNode()) | inv_node = self.nodes[0].add_p2p_connection(BaseNode()) | ||||
# Make sure NODE_NETWORK is not set for test_node, so no block download | # Make sure NODE_NETWORK is not set for test_node, so no block download | ||||
# will occur outside of direct fetching | # will occur outside of direct fetching | ||||
test_node = self.nodes[0].add_p2p_connection(BaseNode(), services=0) | test_node = self.nodes[0].add_p2p_connection(BaseNode(), services=0) | ||||
inv_node.wait_for_verack() | |||||
test_node.wait_for_verack() | |||||
# Ensure verack's have been processed by our peer | # Ensure verack's have been processed by our peer | ||||
inv_node.sync_with_ping() | inv_node.sync_with_ping() | ||||
test_node.sync_with_ping() | test_node.sync_with_ping() | ||||
self.test_null_locators(test_node, inv_node) | self.test_null_locators(test_node, inv_node) | ||||
self.test_nonnull_locators(test_node, inv_node) | self.test_nonnull_locators(test_node, inv_node) | ||||
▲ Show 20 Lines • Show All 378 Lines • Show Last 20 Lines |