We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9682e7 commit ea54ba2Copy full SHA for ea54ba2
test/functional/p2p_getaddr_caching.py
@@ -14,8 +14,7 @@
14
from test_framework.test_framework import BitcoinTestFramework
15
from test_framework.util import (
16
assert_equal,
17
- PORT_MIN,
18
- PORT_RANGE,
+ p2p_port,
19
)
20
21
# As defined in net_processing.
@@ -44,10 +43,9 @@ def addr_received(self):
44
43
class AddrTest(BitcoinTestFramework):
45
def set_test_params(self):
46
self.num_nodes = 1
47
- # Start onion ports after p2p and rpc ports.
48
- port = PORT_MIN + 2 * PORT_RANGE
49
- self.onion_port1 = port
50
- 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)
51
self.extra_args = [
52
[f"-bind=127.0.0.1:{self.onion_port1}=onion", f"-bind=127.0.0.1:{self.onion_port2}=onion"],
53
]
0 commit comments