From 2d49ee56e2823d4020daf285b039f2f528cae087 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Fri, 24 May 2019 14:17:49 +0200 Subject: [PATCH] lntest: add Name() to BackendCfg --- lntest/btcd.go | 5 +++++ lntest/neutrino.go | 5 +++++ lntest/node.go | 3 +++ 3 files changed, 13 insertions(+) diff --git a/lntest/btcd.go b/lntest/btcd.go index 81b222364..7187befd3 100644 --- a/lntest/btcd.go +++ b/lntest/btcd.go @@ -59,6 +59,11 @@ func (b BtcdBackendConfig) DisconnectMiner() error { return b.harness.Node.Node(btcjson.NRemove, b.minerAddr, &perm) } +// Name returns the name of the backend type. +func (b BtcdBackendConfig) Name() string { + return "btcd" +} + // NewBackend starts a new rpctest.Harness and returns a BtcdBackendConfig for // that node. miner should be set to the P2P address of the miner to connect // to. diff --git a/lntest/neutrino.go b/lntest/neutrino.go index 5de568254..d127c0b50 100644 --- a/lntest/neutrino.go +++ b/lntest/neutrino.go @@ -29,6 +29,11 @@ func (b NeutrinoBackendConfig) DisconnectMiner() error { return fmt.Errorf("unimplemented") } +// Name returns the name of the backend type. +func (b NeutrinoBackendConfig) Name() string { + return "neutrino" +} + // NewBackend starts and returns a NeutrinoBackendConfig for the node. func NewBackend(miner string) (*NeutrinoBackendConfig, func(), error) { bd := &NeutrinoBackendConfig{ diff --git a/lntest/node.go b/lntest/node.go index 8aa69e699..751d629a1 100644 --- a/lntest/node.go +++ b/lntest/node.go @@ -104,6 +104,9 @@ type BackendConfig interface { // DisconnectMiner is called to bitconneeeect the miner. DisconnectMiner() error + + // Name returns the name of the backend type. + Name() string } type nodeConfig struct {