Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
gui: Add Open Wallet menu #15153
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Here's a testnet wallet last synced in December 2017. When you open it it starts a rescan in the background. When you cancel it, that rescan doesn't stop afaik. Weird things then happen if you close QT or try to open another or even the same wallet.
Maybe just calling abort rescan internally would be the easiest short term fix? Safest would be to make that blocking (so don't close the modal until the cancel is done).
@Sjors can't abort rescan because the rescan happens before getting the wallet instance on the GUI. I plan to work on that next.
In more detail,
Tested basic loading/unloading opening wallets with the new menu (using regtest):
When loading the example wallet through the
Also tested using mainnet, with wallets that would have long rescan times:
While a wallet is importing the
However, you can currently close the importing modal, then open the same wallet again, which results in the wallet opening (from the first open), the second opening will obviously fail:
In future this could be cleaned up, so that if you close the modal, the wallet that is being imported isn't still available in the Open menu.
I can't reason about the things that might go wrong when a wallet keeps rescanning after a user cancels the load action. I fully expect users to just keep trying to open the same wallet, while that rescan is still going. Can it lead to data loss? Crashes?
If others think it's perfectly safe than do say so... But otherwise, fixing it later would block 0.18 release.
Here's a few ideas: