Skip to content

Commit

Permalink
channeldb: handle errors in delChannelEdgeUnsafe()
Browse files Browse the repository at this point in the history
  • Loading branch information
aakselrod committed Nov 5, 2024
1 parent 6cee52f commit 899ae59
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions channeldb/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -2622,8 +2622,14 @@ func (c *ChannelGraph) delChannelEdgeUnsafe(edges, edgeIndex, chanIndex,

// As part of deleting the edge we also remove all disabled entries
// from the edgePolicyDisabledIndex bucket. We do that for both directions.
updateEdgePolicyDisabledIndex(edges, cid, false, false)
updateEdgePolicyDisabledIndex(edges, cid, true, false)
err = updateEdgePolicyDisabledIndex(edges, cid, false, false)
if err != nil {
return err
}
err = updateEdgePolicyDisabledIndex(edges, cid, true, false)
if err != nil {
return err
}

// With the edge data deleted, we can purge the information from the two
// edge indexes.
Expand Down

0 comments on commit 899ae59

Please sign in to comment.