mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
[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.
This commit is contained in:
parent
0672522aed
commit
47ff5098ad
2 changed files with 9 additions and 3 deletions
|
@ -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")
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue