discovery+routing: remove DeleteEdge from ChannelGraphSource interface
This commit removes the recently added DeleteEdge method from the ChannelGraphSource interface as it’s no longer needed.
This commit is contained in:
parent
81cd954cfc
commit
e81689057a
@ -135,11 +135,6 @@ func (r *mockGraphSource) AddEdge(info *channeldb.ChannelEdgeInfo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *mockGraphSource) DeleteEdge(info *channeldb.ChannelEdgeInfo) error {
|
||||
delete(r.infos, info.ChannelID)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *mockGraphSource) UpdateEdge(edge *channeldb.ChannelEdgePolicy) error {
|
||||
r.edges[edge.ChannelID] = append(
|
||||
r.edges[edge.ChannelID],
|
||||
|
@ -39,9 +39,6 @@ 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
|
||||
@ -1297,13 +1294,6 @@ 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.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user