aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-09-04 13:37:24 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2020-10-27 19:23:02 -0700
commit47ff5098ad5ea2c20ea387f99940a7cde6c80789 (patch)
tree187a8dbd9fca70a984b9c1ea2093860bee8f0afc /test/functional
parent0672522aedd3760c30b8740c7e9487f00bf9dfeb (diff)
downloadbitcoin-47ff5098ad5ea2c20ea387f99940a7cde6c80789.tar.xz
[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.
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/p2p_disconnect_ban.py5
-rwxr-xr-xtest/functional/rpc_net.py7
2 files changed, 9 insertions, 3 deletions
diff --git a/test/functional/p2p_disconnect_ban.py b/test/functional/p2p_disconnect_ban.py
index 3088a8aa46..a7f51b5364 100755
--- a/test/functional/p2p_disconnect_ban.py
+++ b/test/functional/p2p_disconnect_ban.py
@@ -18,8 +18,11 @@ class DisconnectBanTest(BitcoinTestFramework):
def run_test(self):
self.log.info("Connect nodes both way")
+ # By default, the test framework sets up an addnode connection from
+ # node 1 --> node0. By connecting node0 --> node 1, we're left with
+ # the two nodes being connected both ways.
+ # Topology will look like: node0 <--> node1
self.connect_nodes(0, 1)
- self.connect_nodes(1, 0)
self.log.info("Test setban and listbanned RPCs")
diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py
index f8421360c5..03c858c694 100755
--- a/test/functional/rpc_net.py
+++ b/test/functional/rpc_net.py
@@ -51,9 +51,12 @@ class NetTest(BitcoinTestFramework):
def run_test(self):
# Get out of IBD for the minfeefilter and getpeerinfo tests.
self.nodes[0].generate(101)
- # Connect nodes both ways.
+
+ # By default, the test framework sets up an addnode connection from
+ # node 1 --> node0. By connecting node0 --> node 1, we're left with
+ # the two nodes being connected both ways.
+ # Topology will look like: node0 <--> node1
self.connect_nodes(0, 1)
- self.connect_nodes(1, 0)
self.sync_all()
self.test_connection_count()