mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-12 07:08:24 +01:00
router+graph: return ErrGraphNodesNotFound if no nodes to prune
Avoids creating a bucket unneccessarily.
This commit is contained in:
@@ -445,7 +445,8 @@ func (r *ChannelRouter) Start() error {
|
||||
// Finally, before we proceed, we'll prune any unconnected nodes from
|
||||
// the graph in order to ensure we maintain a tight graph of "useful"
|
||||
// nodes.
|
||||
if err := r.cfg.Graph.PruneGraphNodes(); err != nil {
|
||||
err = r.cfg.Graph.PruneGraphNodes()
|
||||
if err != nil && err != channeldb.ErrGraphNodesNotFound {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user