feat: use ChannelDb for channel persistence#14355
Merged
zerosnacks merged 8 commits intofoundry-rs:masterfrom Apr 22, 2026
Merged
feat: use ChannelDb for channel persistence#14355zerosnacks merged 8 commits intofoundry-rs:masterfrom
zerosnacks merged 8 commits intofoundry-rs:masterfrom
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019db125-564b-72b8-ab3d-6f780aa89ff4 Co-authored-by: Amp <amp@ampcode.com> # Conflicts: # Cargo.lock
dbd5d2b to
dcc7ccb
Compare
mablr
reviewed
Apr 21, 2026
| } else { | ||
| channels | ||
| .insert(key.to_string(), PersistedChannel::from_channel_entry(entry, deposit, origin)); | ||
| warn!(key, "upsert_channel_in_memory called for unknown channel"); |
Collaborator
There was a problem hiding this comment.
May this have side-effect, do we always match existing channel ?
Collaborator
Author
There was a problem hiding this comment.
The else branch is unreachable in practice, upsert_channel_in_memory() is only called from the voucher path (session.rs:689) which always operates on an already-open channel. The warn! makes it defensive instead of silently inserting incomplete data.
Collaborator
There was a problem hiding this comment.
okay nice, ty for clarification
zerosnacks
approved these changes
Apr 22, 2026
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.
~/.tempo/foundry/channels.json) with SQLite viafoundry_wallets::ChannelDb(~/.tempo/channels.db)foundry-walletsrev toe8c8be1(includes foundry-core#17)