Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check peer connection when update lnd snapshot #102

Conversation

EthanYuan
Copy link
Collaborator

@EthanYuan EthanYuan commented Mar 21, 2025

This PR improves the logic for updating the LND channels snapshot by adding a check to ensure that peers are currently connected. The snapshot will now only be updated if:

  • No VSS writes are pending, or only the device lock is pending, and
  • There are connected peers

This avoids unnecessary snapshot updates when the node is not connected to the network.


As a next step, if the LND snapshot includes a local_pubkey field, we can cross-check it with the currently connected peers to further strengthen the validation logic.


  • local tested

@EthanYuan EthanYuan requested review from Flouse and ShookLyngs March 21, 2025 05:13
@EthanYuan EthanYuan force-pushed the check-peer-connection-when-update-lnd-snapshot branch from e3fe5c2 to ec98fd1 Compare March 22, 2025 07:03
@EthanYuan EthanYuan force-pushed the check-peer-connection-when-update-lnd-snapshot branch from ec98fd1 to 1e4bc7e Compare March 22, 2025 07:49
@EthanYuan EthanYuan marked this pull request as ready for review March 22, 2025 07:59
@Flouse Flouse requested a review from shaojunda March 24, 2025 07:42
@EthanYuan EthanYuan merged commit 8ae021f into utxostack:develop Mar 24, 2025
9 checks passed
@EthanYuan EthanYuan deleted the check-peer-connection-when-update-lnd-snapshot branch March 24, 2025 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants