routing+discovery: implement 2-week network view pruning
This commit is contained in:
1 parent
32508344db
commit
3907ae65c2
3 files changed
+112
-87
No files matched your search
@@ -39,6 +39,9 @@ type ChannelGraphSource interface {
|
||||
// edge/channel might be used in construction of payment path.
|
||||
AddEdge(edge *channeldb.ChannelEdgeInfo) error
|
||||
|
||||
// DeleteEdge is used to delete an edge from the router database.
|
||||
DeleteEdge(edge *channeldb.ChannelEdgeInfo) error
|
||||
|
||||
// AddProof updates the channel edge info with proof which is needed to
|
||||
// properly announce the edge to the rest of the network.
|
||||
AddProof(chanID lnwire.ShortChannelID, proof *channeldb.ChannelAuthProof) error
|
||||
@@ -1294,6 +1297,13 @@ func (r *ChannelRouter) AddEdge(edge *channeldb.ChannelEdgeInfo) error {
|
||||
}
|
||||
}
|
||||
|
||||
// DeleteEdge is used to delete an edge from the router database.
|
||||
//
|
||||
// NOTE: This method is part of the ChannelGraphSource interface.
|
||||
func (r *ChannelRouter) DeleteEdge(edge *channeldb.ChannelEdgeInfo) error {
|
||||
return r.cfg.Graph.DeleteChannelEdge(&edge.ChannelPoint)
|
||||
}
|
||||
|
||||
// UpdateEdge is used to update edge information, without this message edge
|
||||
// considered as not fully constructed.
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user