diff options
author | Kalle Alm <kalle.alm@gmail.com> | 2017-04-17 23:32:01 +0900 |
---|---|---|
committer | Kalle Alm <kalle.alm@gmail.com> | 2017-04-17 23:35:53 +0900 |
commit | 75a08e7d17da9db2ac0e9f55a4286dda912385bc (patch) | |
tree | b0bd5a496e82dbea577bf57dd3864039f75f785a /src/wallet/wallet.h | |
parent | b7365f0545b1a6862e3277b2b2139ee0d5aee1cf (diff) |
[wallet] Add support for aborting wallet transaction rescans.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index cc1a6b7183..59aa701e1d 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -651,6 +651,8 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface { private: static std::atomic<bool> fFlushScheduled; + std::atomic<bool> fAbortRescan; + std::atomic<bool> fScanningWallet; /** * Select a set of coins such that nValueRet >= nTargetValue and at least @@ -775,6 +777,8 @@ public: nTimeFirstKey = 0; fBroadcastTransactions = false; nRelockTime = 0; + fAbortRescan = false; + fScanningWallet = false; } std::map<uint256, CWalletTx> mapWallet; @@ -819,6 +823,13 @@ public: void UnlockAllCoins(); void ListLockedCoins(std::vector<COutPoint>& vOutpts); + /* + * Rescan abort properties + */ + void AbortRescan() { fAbortRescan = true; } + bool IsAbortingRescan() { return fAbortRescan; } + bool IsScanning() { return fScanningWallet; } + /** * keystore implementation * Generate a new key |