Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions test/functional/p2p_node_network_limited.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,18 @@ def run_test(self):

# connect unsynced node 2 with pruned NODE_NETWORK_LIMITED peer
# because node 2 is in IBD and node 0 is a NODE_NETWORK_LIMITED peer, sync must not be possible
self.connect_nodes(0, 2)
try:
self.sync_blocks([self.nodes[0], self.nodes[2]], timeout=5)
except Exception:
pass
with self.nodes[0].wait_for_debug_log(
[b"Ignore block request below NODE_NETWORK_LIMITED threshold"], timeout=15):
try:
self.connect_nodes(0, 2)
except AssertionError as e:
if "peer disconnected" not in str(e):
raise
Comment thread
thepastaclaw marked this conversation as resolved.
self.log.info("NODE_NETWORK_LIMITED peer disconnected unsynced peer before connect completed")
try:
self.sync_blocks([self.nodes[0], self.nodes[2]], timeout=5)
except AssertionError:
pass # expected: NODE_NETWORK_LIMITED peer cannot serve IBD blocks
# node2 must remain at height 0
assert_equal(self.nodes[2].getblockheader(self.nodes[2].getbestblockhash())['height'], 0)

Expand Down
Loading