feat: persist restored channel peers#82
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40e2d1840d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d6290c8da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| persist_missing_channel_peers( | ||
| channel_manager.list_channels().into_iter().map(|channel| channel.counterparty.node_id), | ||
| &network_graph, | ||
| &peer_store, | ||
| Arc::clone(&logger), | ||
| ); |
There was a problem hiding this comment.
Retry peer recovery after RGS populates the graph
When a restored node uses Rapid Gossip Sync and has no local/VSS graph cache yet, this startup-only recovery runs before Node::start launches the background RGS fetch (src/lib.rs:272-291), so persist_missing_channel_peers sees an empty graph and skips every missing channel counterparty. After RGS later adds the announced addresses, nothing calls the recovery helper again, and the reconnect loop only iterates peer_store.list_peers(), leaving those restored channels offline until the user manually connects.
Useful? React with 👍 / 👎.
Summary
ChannelPendinghandling.0.7.0-rc.40and rebuild Kotlin/Swift bindings.Why
After a wallet restore, channel state can come back without the persisted peer entry. For announced counterparties, the network graph already has the node address, so ldk-node can recover the peer store entry and let the reconnect loop bring the channel back online automatically.
Release
a080569c65880c58ee3fb1bf607c58dbbaef3f570fc80cff8dcfd62217469f780.7.0-rc.40Validation
cargo test peer_store --libCOPYFILE_DISABLE=1 cargo fmt --checkCOPYFILE_DISABLE=1 cargo test --libCOPYFILE_DISABLE=1 cargo clippy --lib(passes with existing warnings)COPYFILE_DISABLE=1 ./bindgen.shCOPYFILE_DISABLE=1 ./scripts/format_kotlin.shgit diff --checkNote One reviewer's approval is enough, PR can be merged then.