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 1414from test_framework .test_framework import BitcoinTestFramework
1515from test_framework .util import (
1616 assert_equal ,
17- PORT_MIN ,
18- PORT_RANGE ,
17+ p2p_port ,
1918)
2019
2120# As defined in net_processing.
@@ -44,10 +43,9 @@ def addr_received(self):
4443class AddrTest (BitcoinTestFramework ):
4544 def set_test_params (self ):
4645 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 )
5149 self .extra_args = [
5250 [f"-bind=127.0.0.1:{ self .onion_port1 } =onion" , f"-bind=127.0.0.1:{ self .onion_port2 } =onion" ],
5351 ]
You can’t perform that action at this time.
0 commit comments