mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-12 18:01:23 +02:00
routing: only update the filter if we have a non-zero chain view
In this commit we ensure that we only update the filter, if we have a non-zero chain view. Otherwise, a mini rescan may be kicked off unnecessarily if we don’t yet know of any channels yet in the greater graph.
This commit is contained in:
parent
7408aa6c8d
commit
2b052cc889
@ -295,10 +295,12 @@ func (r *ChannelRouter) Start() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Filtering chain using %v channels active", len(channelView))
|
log.Infof("Filtering chain using %v channels active", len(channelView))
|
||||||
|
if len(channelView) != 0 {
|
||||||
err = r.cfg.ChainView.UpdateFilter(channelView, pruneHeight)
|
err = r.cfg.ChainView.UpdateFilter(channelView, pruneHeight)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Before we begin normal operation of the router, we first need to
|
// Before we begin normal operation of the router, we first need to
|
||||||
// synchronize the channel graph to the latest state of the UTXO set.
|
// synchronize the channel graph to the latest state of the UTXO set.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user