From 07217f2dd8db11354c894c33dc7aab9adea5f799 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 22 Jun 2025 01:11:19 -0300 Subject: [PATCH] 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! --- lntest/bitcoind_common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lntest/bitcoind_common.go b/lntest/bitcoind_common.go index 36d6aa8b9..ed3c45f02 100644 --- a/lntest/bitcoind_common.go +++ b/lntest/bitcoind_common.go @@ -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,