From 9fd70958f43965488b756d8b6cb05df3f24f22b4 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 5 Jun 2017 19:44:54 -0700 Subject: [PATCH] multi: fix linter errors --- chainntnfs/interface_test.go | 1 - chainntnfs/neutrinonotify/neutrino.go | 4 ++-- chainregistry.go | 4 ++-- lnwallet/btcwallet/config.go | 3 ++- routing/chainview/neutrino.go | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chainntnfs/interface_test.go b/chainntnfs/interface_test.go index 87b52b6ed..c11b3c1e5 100644 --- a/chainntnfs/interface_test.go +++ b/chainntnfs/interface_test.go @@ -933,7 +933,6 @@ func TestInterfaces(t *testing.T) { } case "neutrino": - continue spvDir, err := ioutil.TempDir("", "neutrino") if err != nil { t.Fatalf("unable to create temp dir: %v", err) diff --git a/chainntnfs/neutrinonotify/neutrino.go b/chainntnfs/neutrinonotify/neutrino.go index e5f90d279..7cd26a74e 100644 --- a/chainntnfs/neutrinonotify/neutrino.go +++ b/chainntnfs/neutrinonotify/neutrino.go @@ -6,14 +6,14 @@ import ( "sync" "sync/atomic" + "github.com/lightninglabs/neutrino" + "github.com/lightningnetwork/lnd/chainntnfs" "github.com/roasbeef/btcd/chaincfg/chainhash" "github.com/roasbeef/btcd/wire" "github.com/roasbeef/btcrpcclient" "github.com/roasbeef/btcutil" "github.com/roasbeef/btcutil/gcs/builder" "github.com/roasbeef/btcwallet/waddrmgr" - "github.com/lightninglabs/neutrino" - "github.com/lightningnetwork/lnd/chainntnfs" ) const ( diff --git a/chainregistry.go b/chainregistry.go index 6b38b8b60..d0f26a942 100644 --- a/chainregistry.go +++ b/chainregistry.go @@ -213,13 +213,13 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB) (*chainControl // Create a special websockets rpc client for btcd which will be used // by the wallet for notifications, calls, etc. - chainRpc, err := chain.NewRPCClient(activeNetParams.Params, btcdHost, + chainRPC, err := chain.NewRPCClient(activeNetParams.Params, btcdHost, btcdUser, btcdPass, rpcCert, false, 20) if err != nil { return nil, nil, err } - walletConfig.ChainSource = chainRpc + walletConfig.ChainSource = chainRPC } wc, err := btcwallet.New(*walletConfig) diff --git a/lnwallet/btcwallet/config.go b/lnwallet/btcwallet/config.go index fd9da64b4..ab374de29 100644 --- a/lnwallet/btcwallet/config.go +++ b/lnwallet/btcwallet/config.go @@ -7,11 +7,12 @@ import ( "github.com/roasbeef/btcd/wire" "github.com/roasbeef/btcutil" + "github.com/roasbeef/btcwallet/chain" + // This is required to register bdb as a valid walletdb driver. In the // init function of the package, it registers itself. The import is used // to activate the side effects w/o actually binding the package name to // a file-level variable. - "github.com/roasbeef/btcwallet/chain" _ "github.com/roasbeef/btcwallet/walletdb/bdb" ) diff --git a/routing/chainview/neutrino.go b/routing/chainview/neutrino.go index 09f303eb1..03313c493 100644 --- a/routing/chainview/neutrino.go +++ b/routing/chainview/neutrino.go @@ -5,19 +5,19 @@ import ( "sync" "sync/atomic" + "github.com/lightninglabs/neutrino" "github.com/roasbeef/btcd/chaincfg/chainhash" "github.com/roasbeef/btcd/wire" "github.com/roasbeef/btcrpcclient" "github.com/roasbeef/btcutil" "github.com/roasbeef/btcwallet/waddrmgr" - "github.com/lightninglabs/neutrino" ) // CfFilteredChainView is an implementation of the FilteredChainView interface // which is supported by an underlying Bitcoin light client which supports // client side filtering of Golomb Coded Sets. Rather than fetching all the // blocks, the light client is able to query fitlers locally, to test if an -// item in ablock modifies any of our watched set of UTXOs/ +// item in a block modifies any of our watched set of UTXOs. type CfFilteredChainView struct { started int32 stopped int32