Skip to content

Commit 07217f2

Browse files
committed
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!
1 parent 3d00314 commit 07217f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lntest/bitcoind_common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string,
124124
"d$507c670e800a95284294edb5773b05544b" +
125125
"220110063096c221be9933c82d38e1",
126126
fmt.Sprintf("-rpcport=%d", rpcPort),
127-
fmt.Sprintf("-port=%d", p2pPort),
127+
fmt.Sprintf("-bind=127.0.0.1:%d", p2pPort),
128128
fmt.Sprintf("-bind=127.0.0.1:%d=onion", torBindPort),
129129
"-zmqpubrawblock=" + zmqBlockAddr,
130130
"-zmqpubrawtx=" + zmqTxAddr,

0 commit comments

Comments
 (0)