Closed
Conversation
Channel data may not be readable, e.g. if the serialization support has been dropped in lightning-kmp. If so, we ignore the local data and log the error.
dpad85
commented
Nov 4, 2025
| CREATE TABLE local_channels ( | ||
| channel_id BLOB AS ByteVector32 NOT NULL PRIMARY KEY, | ||
| data BLOB AS PersistedChannelState NOT NULL, | ||
| data BLOB NOT NULL, |
Member
Author
There was a problem hiding this comment.
We don't immediately assume the data can be decoded anymore, so that we can catch and log decoding errors.
|
|
||
| listLocalChannels: | ||
| SELECT data FROM local_channels WHERE is_closed=0; | ||
| SELECT channel_id, data FROM local_channels WHERE is_closed=0; |
Member
Author
There was a problem hiding this comment.
Adding the channel_id here allows us to reuse in listLocalChannels the mapChannelData already used by getChannel. Also, lets us log the id of the faulty channel.
pm47
approved these changes
Nov 4, 2025
Member
Author
|
Superseded by #775. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Local channel data may not be readable, e.g. if the serialisation support for the format used has been dropped in lightning-kmp. This will crash the app. We should instead ignore local channels data when that happens (falling back to the peer backup), and log the error.