lntest: add method P2PAddr to backend

It is useful if we want to keep bitcoind main itest mode, but connect one node
using neutrino.
This commit is contained in:
Boris Nagaev committed 2025-06-22 11:06:54 -03:00
1 parent 07217f2dd8
commit 9100be5ba5
4 files changed
+18

No files matched your search

+5
View File
@@ -85,6 +85,11 @@ func (b BitcoindBackendConfig) Name() string {
return "bitcoind"
}
// P2PAddr return bitcoin p2p ip:port.
func (b BitcoindBackendConfig) P2PAddr() (string, error) {
return fmt.Sprintf("127.0.0.1:%d", b.p2pPort), nil
}
// newBackend starts a bitcoind node with the given extra parameters and returns
// a BitcoindBackendConfig for that node.
func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string,