-
Notifications
You must be signed in to change notification settings - Fork 590
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
chainntfns: Panics during initial sync blow up consumers. #827
Comments
Ah, this makes sense, much of the recent work we've done in What's missing here is that we properly thread through a I agree that panic doesn't really need to be there either, it should be handled gracefully. So we'd either need to try to retry once the wallet is unlocked again, or move it to something periodic tat attempts to sync again once things are clear. |
This would be good. There are numerous ways this explicit panic in
|
Just got this recovering a mainnet wallet:
The neutrino log had no direct error at the time, but shortly prior the node to which that getdata block request was made had dropped and reconnected a couple times. |
This seems to come up a bit while testing dcrdex. Will attempt to stop the panics as simply as possible if that's alright. Will look through the code some more and come up with a plan. |
Specifically, if wallet is locked during recovery btcwallet panics. Trying to use the wallet blows up whatever app is using it if a user simply locks the wallet at the wrong time. I also don't think there is a way to check if btcwallet is currently doing recovery.
I wonder if it's possible to remove the panic logic in
*Wallet.handleChainNotifications
altogether and handle errors more gracefully?The point of panic that is causing some pain
btcwallet/wallet/chainntfns.go
Lines 115 to 119 in 27f244e
The problematic recovery that we can not currently escape unless shutdown. Locking the wallet here panics.
btcwallet/wallet/wallet.go
Lines 665 to 792 in 27f244e
The text was updated successfully, but these errors were encountered: