mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-23 15:20:49 +01:00
[test] Fix port collisions caused by p2p_getaddr_caching.py
This commit is contained in:
parent
f9682e75ac
commit
ea54ba2f42
1 changed files with 4 additions and 6 deletions
|
@ -14,8 +14,7 @@ from test_framework.p2p import (
|
||||||
from test_framework.test_framework import BitcoinTestFramework
|
from test_framework.test_framework import BitcoinTestFramework
|
||||||
from test_framework.util import (
|
from test_framework.util import (
|
||||||
assert_equal,
|
assert_equal,
|
||||||
PORT_MIN,
|
p2p_port,
|
||||||
PORT_RANGE,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# As defined in net_processing.
|
# As defined in net_processing.
|
||||||
|
@ -44,10 +43,9 @@ class AddrReceiver(P2PInterface):
|
||||||
class AddrTest(BitcoinTestFramework):
|
class AddrTest(BitcoinTestFramework):
|
||||||
def set_test_params(self):
|
def set_test_params(self):
|
||||||
self.num_nodes = 1
|
self.num_nodes = 1
|
||||||
# Start onion ports after p2p and rpc ports.
|
# Use some of the remaining p2p ports for the onion binds.
|
||||||
port = PORT_MIN + 2 * PORT_RANGE
|
self.onion_port1 = p2p_port(1)
|
||||||
self.onion_port1 = port
|
self.onion_port2 = p2p_port(2)
|
||||||
self.onion_port2 = port + 1
|
|
||||||
self.extra_args = [
|
self.extra_args = [
|
||||||
[f"-bind=127.0.0.1:{self.onion_port1}=onion", f"-bind=127.0.0.1:{self.onion_port2}=onion"],
|
[f"-bind=127.0.0.1:{self.onion_port1}=onion", f"-bind=127.0.0.1:{self.onion_port2}=onion"],
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Reference in a new issue