File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 14
14
from test_framework .test_framework import BitcoinTestFramework
15
15
from test_framework .util import (
16
16
assert_equal ,
17
- PORT_MIN ,
18
- PORT_RANGE ,
17
+ p2p_port ,
19
18
)
20
19
21
20
# As defined in net_processing.
@@ -44,10 +43,9 @@ def addr_received(self):
44
43
class AddrTest (BitcoinTestFramework ):
45
44
def set_test_params (self ):
46
45
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
46
+ # Use some of the remaining p2p ports for the onion binds.
47
+ self .onion_port1 = p2p_port (1 )
48
+ self .onion_port2 = p2p_port (2 )
51
49
self .extra_args = [
52
50
[f"-bind=127.0.0.1:{ self .onion_port1 } =onion" , f"-bind=127.0.0.1:{ self .onion_port2 } =onion" ],
53
51
]
You can’t perform that action at this time.
0 commit comments