lntest: define BackendCfg and btcd impl

BackendCfg is an interface that can be backed by different Bitcoin node
implementations. We currently use the btcdHarness as our chain backend.
This commit is contained in:
Johan T. Halseth
2018-12-14 09:24:00 +01:00
parent cb1df51a3a
commit 989fe50da8
4 changed files with 123 additions and 21 deletions

View File

@@ -12970,9 +12970,14 @@ func TestLightningNetworkDaemon(t *testing.T) {
}
}()
chainBackend := lntest.BtcdBackendConfig{
RPCConfig: btcdHarness.RPCConfig(),
P2PAddress: btcdHarness.P2PAddress(),
}
// First create the network harness to gain access to its
// 'OnTxAccepted' call back.
lndHarness, err = lntest.NewNetworkHarness(btcdHarness)
lndHarness, err = lntest.NewNetworkHarness(btcdHarness, chainBackend)
if err != nil {
ht.Fatalf("unable to create lightning network harness: %v", err)
}