routing: prune nodes from the channel graph on start up
This commit is contained in:
parent
0645261e5e
commit
f8cbe34e93
@ -9,6 +9,9 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/coreos/bbolt"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
@ -17,9 +20,6 @@ import (
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/multimutex"
|
||||
"github.com/lightningnetwork/lnd/routing/chainview"
|
||||
"github.com/btcsuite/btcd/btcec"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
|
||||
"crypto/sha256"
|
||||
|
||||
@ -382,6 +382,13 @@ func (r *ChannelRouter) Start() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// 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 {
|
||||
return err
|
||||
}
|
||||
|
||||
r.wg.Add(1)
|
||||
go r.networkHandler()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user