lntest: fix p2p port binding

Use an additional -bind flag instead of -port to specify the default p2p port.

Flag -port sets the default port number that will be used for any -bind or
-whitebind that does not explicitly specify a port. So if we have the p2p
port set in -port and the tor p2p port set in a single -bind, bitcoind binds
only one port - the tor p2p port. And the default p2p port remained not bound!
This commit is contained in:
Boris Nagaev
2025-06-22 01:11:19 -03:00
parent 3d0031435c
commit 07217f2dd8

View File

@@ -124,7 +124,7 @@ func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string,
"d$507c670e800a95284294edb5773b05544b" +
"220110063096c221be9933c82d38e1",
fmt.Sprintf("-rpcport=%d", rpcPort),
fmt.Sprintf("-port=%d", p2pPort),
fmt.Sprintf("-bind=127.0.0.1:%d", p2pPort),
fmt.Sprintf("-bind=127.0.0.1:%d=onion", torBindPort),
"-zmqpubrawblock=" + zmqBlockAddr,
"-zmqpubrawtx=" + zmqTxAddr,