Skip to content

localchans: recreate missing edge if not found#8805

Merged
guggero merged 8 commits into
lightningnetwork:masterfrom
breez:jssdwt-insert-edge-when-not-found
Nov 22, 2024
Merged

localchans: recreate missing edge if not found#8805
guggero merged 8 commits into
lightningnetwork:masterfrom
breez:jssdwt-insert-edge-when-not-found

Conversation

@JssDWt
Copy link
Copy Markdown
Contributor

@JssDWt JssDWt commented Jun 3, 2024

Change Description

Description of change / link to associated issue.If a node contains a channel, but doesn't have a corresponding edge in the graph database, updating the channel policy would fail. In this commit the edge is recreated if the channel exists. This ensures a node can recover from a missing edge in the graph database by calling updatechanpolicy.

Alternative for #8768, namely option 2 in #8768 (comment)
Partially fixes #7261 by allowing to recreate the edge by calling updatechanpolicy.

Steps to Test

  • Create a node that has a channel with a missing edge
  • Calling getchaninfo on this channel will fail
  • Call updatechanpolicy on this channel
  • Calling getchaninfo on this channel should succeed

I'm not sure how to create an integration test where I can modify the graph database to delete an edge in order to test this. Please advise.

Pull Request Checklist

Testing

  • Your PR passes all CI checks.
  • Tests covering the positive and negative (error paths) are included.
  • Bug fixes contain tests triggering the bug to prevent regressions.

Code Style and Documentation

📝 Please see our Contribution Guidelines for further guidance.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

graph P2 should be fixed if one has time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: "edge not found" for local channel

6 participants