lntest: add Name() to BackendCfg

This commit is contained in:
Johan T. Halseth 2019-05-24 14:17:49 +02:00
parent 8f5a4beaad
commit 2d49ee56e2
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26
3 changed files with 13 additions and 0 deletions

@ -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.

@ -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{

@ -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 {