chainntnfs/neutrino_debug: new neutrino API

This commit is contained in:
Johan T. Halseth 2018-09-10 12:46:23 +02:00
parent e0fd163096
commit 6db0bc4b05
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -8,7 +8,6 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/rpcclient"
"github.com/btcsuite/btcwallet/waddrmgr"
"github.com/lightninglabs/neutrino"
"github.com/lightningnetwork/lnd/chainntnfs"
)
@ -26,14 +25,10 @@ func (n *NeutrinoNotifier) UnsafeStart(bestHeight int32, bestHash *chainhash.Has
// start the auto-rescan from this point. Once a caller actually wishes
// to register a chain view, the rescan state will be rewound
// accordingly.
header, height, err := n.p2pNode.BlockHeaders.ChainTip()
startingPoint, err := n.p2pNode.BestBlock()
if err != nil {
return err
}
startingPoint := &waddrmgr.BlockStamp{
Height: int32(height),
Hash: header.BlockHash(),
}
// Next, we'll create our set of rescan options. Currently it's
// required that a user MUST set an addr/outpoint/txid when creating a