From 505544e1b3a95a344e2169b89485d11f44d587c7 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 11 Jul 2018 17:33:42 -0700 Subject: [PATCH] routing/chainview: update API usage for neutrino due to recent changes --- routing/chainview/interface_test.go | 5 ++--- routing/chainview/neutrino.go | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/routing/chainview/interface_test.go b/routing/chainview/interface_test.go index 2d88ee0e..c563434a 100644 --- a/routing/chainview/interface_test.go +++ b/routing/chainview/interface_test.go @@ -12,8 +12,6 @@ import ( "testing" "time" - "github.com/lightninglabs/neutrino" - "github.com/ltcsuite/ltcd/btcjson" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" @@ -22,6 +20,8 @@ import ( "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" + "github.com/lightninglabs/neutrino" + "github.com/ltcsuite/ltcd/btcjson" "github.com/btcsuite/btcwallet/walletdb" _ "github.com/btcsuite/btcwallet/walletdb/bdb" // Required to register the boltdb walletdb implementation. @@ -835,7 +835,6 @@ var interfaceImpls = []struct { ConnectPeers: []string{p2pAddr}, } - neutrino.WaitForMoreCFHeaders = 250 * time.Millisecond spvNode, err := neutrino.NewChainService(spvConfig) if err != nil { return nil, nil, err diff --git a/routing/chainview/neutrino.go b/routing/chainview/neutrino.go index a792d967..53e71ba3 100644 --- a/routing/chainview/neutrino.go +++ b/routing/chainview/neutrino.go @@ -5,13 +5,13 @@ import ( "sync" "sync/atomic" - "github.com/lightninglabs/neutrino" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/rpcclient" "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcutil" "github.com/btcsuite/btcutil/gcs/builder" "github.com/btcsuite/btcwallet/waddrmgr" + "github.com/lightninglabs/neutrino" ) // CfFilteredChainView is an implementation of the FilteredChainView interface @@ -29,7 +29,7 @@ type CfFilteredChainView struct { // chainView is the active rescan which only watches our specified // sub-set of the UTXO set. - chainView neutrino.Rescan + chainView *neutrino.Rescan // rescanErrChan is the channel that any errors encountered during the // rescan will be sent over.