test: Fix out-of-range port collisions

This commit is contained in:
MacroFake
2022-06-10 12:59:34 +02:00
parent c3daa321f9
commit fa7a711a30
3 changed files with 10 additions and 19 deletions

View File

@@ -44,8 +44,8 @@ class AddrTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
# Use some of the remaining p2p ports for the onion binds.
self.onion_port1 = p2p_port(1)
self.onion_port2 = p2p_port(2)
self.onion_port1 = p2p_port(self.num_nodes)
self.onion_port2 = p2p_port(self.num_nodes + 1)
self.extra_args = [
[f"-bind=127.0.0.1:{self.onion_port1}=onion", f"-bind=127.0.0.1:{self.onion_port2}=onion"],
]