Skip to content

Commit 47ff509

Browse files
committed
[test] Clarify setup of node topology.
Since the test framework automatically sets up a connection between the nodes, the second connect_nodes call was a no-op. Remove the redundant call & add comments to explain the expected topology.
1 parent 0672522 commit 47ff509

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

test/functional/p2p_disconnect_ban.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ def set_test_params(self):
1818

1919
def run_test(self):
2020
self.log.info("Connect nodes both way")
21+
# By default, the test framework sets up an addnode connection from
22+
# node 1 --> node0. By connecting node0 --> node 1, we're left with
23+
# the two nodes being connected both ways.
24+
# Topology will look like: node0 <--> node1
2125
self.connect_nodes(0, 1)
22-
self.connect_nodes(1, 0)
2326

2427
self.log.info("Test setban and listbanned RPCs")
2528

test/functional/rpc_net.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ def set_test_params(self):
5151
def run_test(self):
5252
# Get out of IBD for the minfeefilter and getpeerinfo tests.
5353
self.nodes[0].generate(101)
54-
# Connect nodes both ways.
54+
55+
# By default, the test framework sets up an addnode connection from
56+
# node 1 --> node0. By connecting node0 --> node 1, we're left with
57+
# the two nodes being connected both ways.
58+
# Topology will look like: node0 <--> node1
5559
self.connect_nodes(0, 1)
56-
self.connect_nodes(1, 0)
5760
self.sync_all()
5861

5962
self.test_connection_count()

0 commit comments

Comments
 (0)