mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-10 23:58:17 +02:00
test: dont connect nodes in feature_bind_port_discover
Signed-off-by: b-l-u-e <winnie.gitau282@gmail.com>
This commit is contained in:
@@ -38,6 +38,24 @@ class BindPortDiscoverTest(BitcoinTestFramework):
|
||||
]
|
||||
self.num_nodes = len(self.extra_args)
|
||||
|
||||
def setup_network(self):
|
||||
"""
|
||||
Override to avoid connecting nodes together. This test intentionally does not connect nodes
|
||||
because each node is bound to a different address or interface, and connections are not needed.
|
||||
"""
|
||||
self.setup_nodes()
|
||||
|
||||
def setup_nodes(self):
|
||||
"""
|
||||
Override to set has_explicit_bind=True for nodes with explicit bind arguments.
|
||||
"""
|
||||
self.add_nodes(self.num_nodes, self.extra_args)
|
||||
# TestNode.start() will add -bind= to extra_args if has_explicit_bind is
|
||||
# False. We do not want any -bind= thus set has_explicit_bind to True.
|
||||
for node in self.nodes:
|
||||
node.has_explicit_bind = True
|
||||
self.start_nodes()
|
||||
|
||||
def add_options(self, parser):
|
||||
parser.add_argument(
|
||||
"--ihave1111and2222", action='store_true', dest="ihave1111and2222",
|
||||
|
||||
Reference in New Issue
Block a user