aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2018-04-13 20:51:51 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2018-04-13 20:51:59 +0200
commit5f2a39946fd42535038e0143cbd289d3070b9f07 (patch)
treeebb8b504a1a14321717c2c705d6a70d9a543121f /src/interfaces
parent23e7fe8be827cdcdcace2a77ecc683074b97f8a2 (diff)
parentae1d2b0308d7fe9df7fc18699c69e9587e6154bd (diff)
downloadbitcoin-5f2a39946fd42535038e0143cbd289d3070b9f07.tar.xz
Merge #11200: Allow for aborting rescans in the GUI
ae1d2b030 Give an error when rescan is aborted by the user (Andrew Chow) 69b01e6f8 Add cancel button to rescan progress dialog (Andrew Chow) Pull request description: A cancel button is added to the `showProgress` dialog that is used only for rescans. When clicked, `AbortRescan` is called directly to cancel the rescan. Rescans triggered from the debug console will now be cancelable by clicking the cancel button. Rescans triggered by a command (e.g. `importmulti`) will now give an error indicating that the rescan was aborted by the user (either by the `abortrescan` command or by clicking cancel). Tree-SHA512: 4bb14998766de686e2318fbc9805758eccf5dbe628a7257d072c9ae2fb4f61303a0876f49988d6e5eddb261969b8a307c81c0c2df0a42ae909a43d738af3dc1b
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/wallet.cpp1
-rw-r--r--src/interfaces/wallet.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp
index fbf631f7da..3e6f0d6728 100644
--- a/src/interfaces/wallet.cpp
+++ b/src/interfaces/wallet.cpp
@@ -130,6 +130,7 @@ public:
{
return m_wallet.ChangeWalletPassphrase(old_wallet_passphrase, new_wallet_passphrase);
}
+ void abortRescan() override { m_wallet.AbortRescan(); }
bool backupWallet(const std::string& filename) override { return m_wallet.BackupWallet(filename); }
std::string getWalletName() override { return m_wallet.GetName(); }
bool getKeyFromPool(bool internal, CPubKey& pub_key) override
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h
index 3e27242c2c..dfe3d5f711 100644
--- a/src/interfaces/wallet.h
+++ b/src/interfaces/wallet.h
@@ -65,6 +65,9 @@ public:
virtual bool changeWalletPassphrase(const SecureString& old_wallet_passphrase,
const SecureString& new_wallet_passphrase) = 0;
+ //! Abort a rescan.
+ virtual void abortRescan() = 0;
+
//! Back up wallet.
virtual bool backupWallet(const std::string& filename) = 0;