diff options
author | dergoegge <n.goeggi@gmail.com> | 2022-06-08 18:29:03 +0200 |
---|---|---|
committer | dergoegge <n.goeggi@gmail.com> | 2022-06-08 21:00:45 +0200 |
commit | ea54ba2f42f6d0b23570c665c2369f977bf55cf6 (patch) | |
tree | 5156106fbc3e6b918f48bcf3b8247f4160f28ce9 | |
parent | f9682e75ac184a62c7e29287882df34c25303033 (diff) | |
download | bitcoin-ea54ba2f42f6d0b23570c665c2369f977bf55cf6.tar.xz |
[test] Fix port collisions caused by p2p_getaddr_caching.py
-rwxr-xr-x | test/functional/p2p_getaddr_caching.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/functional/p2p_getaddr_caching.py b/test/functional/p2p_getaddr_caching.py index c934a97729..0d42bd9d9e 100755 --- a/test/functional/p2p_getaddr_caching.py +++ b/test/functional/p2p_getaddr_caching.py @@ -14,8 +14,7 @@ from test_framework.p2p import ( from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, - PORT_MIN, - PORT_RANGE, + p2p_port, ) # As defined in net_processing. @@ -44,10 +43,9 @@ class AddrReceiver(P2PInterface): class AddrTest(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 1 - # Start onion ports after p2p and rpc ports. - port = PORT_MIN + 2 * PORT_RANGE - self.onion_port1 = port - self.onion_port2 = port + 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.extra_args = [ [f"-bind=127.0.0.1:{self.onion_port1}=onion", f"-bind=127.0.0.1:{self.onion_port2}=onion"], ] |