From eccf20c5b2edbfc5b7f2de1d6fbcb98848838f34 Mon Sep 17 00:00:00 2001 From: Harsha Goli Date: Fri, 3 Dec 2021 12:42:02 -0500 Subject: [PATCH 1/2] lntest: export attributes of type BitcoindBackendConfig Allows these values to be accessed upstream --- lntest/bitcoind_common.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lntest/bitcoind_common.go b/lntest/bitcoind_common.go index 9fc03756b..d116ac686 100644 --- a/lntest/bitcoind_common.go +++ b/lntest/bitcoind_common.go @@ -22,12 +22,12 @@ const logDirPattern = "%s/.backendlogs" // BitcoindBackendConfig is an implementation of the BackendConfig interface // backed by a Bitcoind node. type BitcoindBackendConfig struct { - rpcHost string - rpcUser string - rpcPass string - zmqBlockPath string - zmqTxPath string - p2pPort int + RpcHost string + RpcUser string + RpcPass string + ZmqBlockPath string + ZmqTxPath string + P2pPort int rpcClient *rpcclient.Client // minerAddr is the p2p address of the miner to connect to. @@ -43,13 +43,13 @@ var _ BackendConfig = (*BitcoindBackendConfig)(nil) func (b BitcoindBackendConfig) GenArgs() []string { var args []string args = append(args, "--bitcoin.node=bitcoind") - args = append(args, fmt.Sprintf("--bitcoind.rpchost=%v", b.rpcHost)) - args = append(args, fmt.Sprintf("--bitcoind.rpcuser=%v", b.rpcUser)) - args = append(args, fmt.Sprintf("--bitcoind.rpcpass=%v", b.rpcPass)) + args = append(args, fmt.Sprintf("--bitcoind.rpchost=%v", b.RpcHost)) + args = append(args, fmt.Sprintf("--bitcoind.rpcuser=%v", b.RpcUser)) + args = append(args, fmt.Sprintf("--bitcoind.rpcpass=%v", b.RpcPass)) args = append(args, fmt.Sprintf("--bitcoind.zmqpubrawblock=%v", - b.zmqBlockPath)) + b.ZmqBlockPath)) args = append(args, fmt.Sprintf("--bitcoind.zmqpubrawtx=%v", - b.zmqTxPath)) + b.ZmqTxPath)) return args } @@ -179,12 +179,12 @@ func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string) ( } bd := BitcoindBackendConfig{ - rpcHost: rpcHost, - rpcUser: rpcUser, - rpcPass: rpcPass, - zmqBlockPath: zmqBlockAddr, - zmqTxPath: zmqTxAddr, - p2pPort: p2pPort, + RpcHost: rpcHost, + RpcUser: rpcUser, + RpcPass: rpcPass, + ZmqBlockPath: zmqBlockAddr, + ZmqTxPath: zmqTxAddr, + P2pPort: p2pPort, rpcClient: client, minerAddr: miner, } From 64a34f4f9f57b7cb7ae9f2b1fbc29da6ae9ea8b4 Mon Sep 17 00:00:00 2001 From: Harsha Goli Date: Fri, 3 Dec 2021 12:57:28 -0500 Subject: [PATCH 2/2] docs: update release notes --- docs/release-notes/release-notes-0.14.2.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/release-notes-0.14.2.md b/docs/release-notes/release-notes-0.14.2.md index 09f1fbdc3..c97031984 100644 --- a/docs/release-notes/release-notes-0.14.2.md +++ b/docs/release-notes/release-notes-0.14.2.md @@ -6,10 +6,15 @@ install](https://github.com/lightningnetwork/lnd/pull/6035). * [Make etcd max message size - configurable]((https://github.com/lightningnetwork/lnd/pull/6049). + configurable](https://github.com/lightningnetwork/lnd/pull/6049). + +* [Export bitcoind port and other values for itests, useful for + using itest harness outside of + lnd](https://github.com/lightningnetwork/lnd/pull/6050). # Contributors (Alphabetical Order) * Andras Banki-Horvath +* Harsha Goli * Naveen Srinivasan * Oliver Gugger