multi: add DeleteChannelEdges to VersionedGraph
Add version-aware DeleteChannelEdges method to VersionedGraph and update call sites in graph builder, rpcserver, and server to use versioned graphs. This ensures channel deletion operations are properly scoped to the correct gossip version.
This commit is contained in:
5 files changed
+36
-4
No files matched your search
+3
-2
@@ -3196,7 +3196,7 @@ func createRPCCloseUpdate(
|
||||
// abandonChanFromGraph attempts to remove a channel from the channel graph. If
|
||||
// we can't find the chanID in the graph, then we assume it has already been
|
||||
// removed, and will return a nop.
|
||||
func abandonChanFromGraph(chanGraph *graphdb.ChannelGraph,
|
||||
func abandonChanFromGraph(chanGraph *graphdb.VersionedGraph,
|
||||
chanPoint *wire.OutPoint) error {
|
||||
|
||||
// First, we'll obtain the channel ID. If we can't locate this, then
|
||||
@@ -3237,7 +3237,8 @@ func (r *rpcServer) abandonChan(chanPoint *wire.OutPoint,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = abandonChanFromGraph(r.server.graphDB, chanPoint)
|
||||
// TODO: update to support deletions for v2 channels.
|
||||
err = abandonChanFromGraph(r.server.v1Graph, chanPoint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user