Merge pull request #4841 from jmacxx/fix_issue_4833

Prompt for confirmation before initiating SPV resync
This commit is contained in:
Christoph Atteneder 2020-11-26 16:13:00 +01:00 committed by GitHub
commit 99d5652aef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -1284,7 +1284,7 @@ settings.net.inbound=inbound
settings.net.outbound=outbound
settings.net.reSyncSPVChainLabel=Resync SPV chain
settings.net.reSyncSPVChainButton=Delete SPV file and resync
settings.net.reSyncSPVSuccess=The SPV chain file will be deleted on the next startup. You need to restart your application now.\n\n\
settings.net.reSyncSPVSuccess=Are you sure you want to do an SPV resync? If you proceed, the SPV chain file will be deleted on the next startup.\n\n\
After the restart it can take a while to resync with the network and you will only see all transactions once the resync is completed.\n\n\
Depending on the number of transactions and the age of your wallet the resync can take up to a few hours and consumes 100% of CPU. \
Do not interrupt the process otherwise you have to repeat it.

View file

@ -801,14 +801,14 @@ public class GUIUtil {
public static void reSyncSPVChain(Preferences preferences) {
try {
new Popup().feedback(Res.get("settings.net.reSyncSPVSuccess"))
new Popup().information(Res.get("settings.net.reSyncSPVSuccess"))
.useShutDownButton()
.actionButtonText(Res.get("shared.shutDown"))
.onAction(() -> {
preferences.setResyncSpvRequested(true);
UserThread.runAfter(BisqApp.getShutDownHandler(), 100, TimeUnit.MILLISECONDS);
})
.hideCloseButton()
.closeButtonText(Res.get("shared.cancel"))
.show();
} catch (Throwable t) {
new Popup().error(Res.get("settings.net.reSyncSPVFailed", t)).show();