routing: purge closed channels from the routing table
This commit properly removes any/all closed channels from the routing table. In the current implementation individual links (channels) between nodes are treated sparely from the PoV of the routing table. In the future, this behavior should be modified such that, the routing table views all the links between nodes as a single channel. Such a change will simplify the task of path finding as the links can simply be viewed as a channel with the sum of their capacities. The link layer (htlcSwitch) will handle the details of fragmentation on a local basis.
This commit is contained in:
3 files changed
+55
-13
No files matched your search
@@ -94,7 +94,6 @@ func newServer(listenAddrs []string, notifier chainntnfs.ChainNotifier,
|
||||
chainNotifier: notifier,
|
||||
chanDB: chanDB,
|
||||
fundingMgr: newFundingManager(wallet),
|
||||
htlcSwitch: newHtlcSwitch(),
|
||||
invoices: newInvoiceRegistry(chanDB),
|
||||
lnwallet: wallet,
|
||||
identityPriv: privKey,
|
||||
@@ -126,6 +125,7 @@ func newServer(listenAddrs []string, notifier chainntnfs.ChainNotifier,
|
||||
// the graph.
|
||||
selfVertex := hex.EncodeToString(serializedPubKey)
|
||||
s.routingMgr = routing.NewRoutingManager(graph.NewID(selfVertex), nil)
|
||||
s.htlcSwitch = newHtlcSwitch(serializedPubKey, s.routingMgr)
|
||||
|
||||
s.rpcServer = newRpcServer(s)
|
||||
|
||||
|
||||
Reference in new issue
Block a user