chainntnfs/neutrino: provide n.quit as neutrino QuitChan option

This will make sure a long-running rescan can be canceled in the case
the notifier is shutting down.
This commit is contained in:
Johan T. Halseth 2018-08-24 15:37:04 +02:00
parent 6110182371
commit 183adf6e61
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -764,6 +764,7 @@ func (n *NeutrinoNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
neutrino.EndBlock(&waddrmgr.BlockStamp{ neutrino.EndBlock(&waddrmgr.BlockStamp{
Height: int32(historicalDispatch.EndHeight), Height: int32(historicalDispatch.EndHeight),
}), }),
neutrino.QuitChan(n.quit),
) )
if err != nil && !strings.Contains(err.Error(), "not found") { if err != nil && !strings.Contains(err.Error(), "not found") {
return nil, err return nil, err