-
Notifications
You must be signed in to change notification settings - Fork 2
fix: sync exception caught causing app crash #657
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
base: master
Are you sure you want to change the base?
Conversation
| connectToTrustedPeers().onFailure { | ||
| Logger.error("Failed to connect to trusted peers", it, context = TAG) | ||
| } | ||
| sync().getOrThrow().also { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of this, the repository was setting the node state as initialLifecycleState on repository, even it being running on service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and causing a infinite loop of start
Fixes #652
This PR fixes the "Bitkit keeps stopping" crash that occurs after wallet restoration when LDK's transaction sync encounters an unconfirmed channel funding transaction on Electrum.
Description
The root cause was that after wallet restoration, LDK couldn't find a confirmed channel's funding transaction on Electrum, because it is a zero-conf channel restored before the transaction is confirmed, causing an infinite retry loop until timeout.
Also the retry flow was setting the node state as initialLifecycleState on repository, even it being running on service
Preview
master-with-crash.webm
fixed.webm
QA Notes
1. Verify sync error handling