mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-08 21:42:42 +02:00
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:
@@ -135,11 +135,6 @@ func (r *mockGraphSource) AddEdge(info *channeldb.ChannelEdgeInfo) error {
|
|||||||
return nil
|
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 {
|
func (r *mockGraphSource) UpdateEdge(edge *channeldb.ChannelEdgePolicy) error {
|
||||||
r.edges[edge.ChannelID] = append(
|
r.edges[edge.ChannelID] = append(
|
||||||
r.edges[edge.ChannelID],
|
r.edges[edge.ChannelID],
|
||||||
|
@@ -39,9 +39,6 @@ type ChannelGraphSource interface {
|
|||||||
// edge/channel might be used in construction of payment path.
|
// edge/channel might be used in construction of payment path.
|
||||||
AddEdge(edge *channeldb.ChannelEdgeInfo) error
|
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
|
// AddProof updates the channel edge info with proof which is needed to
|
||||||
// properly announce the edge to the rest of the network.
|
// properly announce the edge to the rest of the network.
|
||||||
AddProof(chanID lnwire.ShortChannelID, proof *channeldb.ChannelAuthProof) error
|
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
|
// UpdateEdge is used to update edge information, without this message edge
|
||||||
// considered as not fully constructed.
|
// considered as not fully constructed.
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user