multi: update to latest ChainNotifier impl New method

This commit is contained in:
Wilmer Paulino
2018-12-06 21:14:10 -08:00
parent 969acf6145
commit c72da48111
3 changed files with 11 additions and 12 deletions

View File

@@ -1777,14 +1777,16 @@ func TestInterfaces(t *testing.T) {
)
newNotifier = func() (chainntnfs.TestChainNotifier, error) {
return bitcoindnotify.New(
bitcoindConn, hintCache, hintCache,
bitcoindConn, chainntnfs.NetParams,
hintCache, hintCache,
), nil
}
case "btcd":
newNotifier = func() (chainntnfs.TestChainNotifier, error) {
return btcdnotify.New(
&rpcConfig, hintCache, hintCache,
&rpcConfig, chainntnfs.NetParams,
hintCache, hintCache,
)
}
@@ -1796,7 +1798,7 @@ func TestInterfaces(t *testing.T) {
newNotifier = func() (chainntnfs.TestChainNotifier, error) {
return neutrinonotify.New(
spvNode, hintCache, hintCache,
)
), nil
}
}

View File

@@ -256,12 +256,7 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB,
// Next we'll create the instances of the ChainNotifier and
// FilteredChainView interface which is backed by the neutrino
// light client.
cc.chainNotifier, err = neutrinonotify.New(
svc, hintCache, hintCache,
)
if err != nil {
return nil, nil, err
}
cc.chainNotifier = neutrinonotify.New(svc, hintCache, hintCache)
cc.chainView, err = chainview.NewCfFilteredChainView(svc)
if err != nil {
return nil, nil, err
@@ -336,7 +331,7 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB,
}
cc.chainNotifier = bitcoindnotify.New(
bitcoindConn, hintCache, hintCache,
bitcoindConn, activeNetParams.Params, hintCache, hintCache,
)
cc.chainView = chainview.NewBitcoindFilteredChainView(bitcoindConn)
walletConfig.ChainSource = bitcoindConn.NewBitcoindClient()
@@ -446,7 +441,7 @@ func newChainControlFromConfig(cfg *config, chanDB *channeldb.DB,
DisableAutoReconnect: false,
}
cc.chainNotifier, err = btcdnotify.New(
rpcConfig, hintCache, hintCache,
rpcConfig, activeNetParams.Params, hintCache, hintCache,
)
if err != nil {
return nil, nil, err

View File

@@ -2362,7 +2362,9 @@ func TestLightningWallet(t *testing.T) {
if err != nil {
t.Fatalf("unable to create height hint cache: %v", err)
}
chainNotifier, err := btcdnotify.New(&rpcConfig, hintCache, hintCache)
chainNotifier, err := btcdnotify.New(
&rpcConfig, netParams, hintCache, hintCache,
)
if err != nil {
t.Fatalf("unable to create notifier: %v", err)
}