aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2019-05-06 13:37:51 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2019-05-06 13:38:12 +0200
commitc5ffe8d5155b21d0099259416436d09fc20d7017 (patch)
tree9b40e0266e7fae2ecb24f16556bf7f3e24aa2b61 /src/wallet/wallet.cpp
parenta3d2d6b0674c11e7c0cf227848322470b1cf11e9 (diff)
parentb6c748f84909212dce73e4b77aa125ed1e108a10 (diff)
downloadbitcoin-c5ffe8d5155b21d0099259416436d09fc20d7017.tar.xz
Merge #15730: rpc: Show scanning details in getwalletinfo
b6c748f84909212dce73e4b77aa125ed1e108a10 doc: Add release notes for 15730 (João Barbosa) d3e8458365ab29017241bc43204fe81cb7fd8530 rpc: Show scanning details in getwalletinfo (João Barbosa) 90e27abe37cc84c7b206f20d28aafe32e71e7209 wallet: Track current scanning progress (João Barbosa) 2ee811e6930cf76ea51e6826fe437ed888688adc wallet: Track scanning duration (João Barbosa) Pull request description: Closes #15724. ACKs for commit b6c748: MarcoFalke: re-utACK b6c748f849 (Only change since my last review is rebase, adding release notes, and returning false instead of null) laanwj: utACK b6c748f84909212dce73e4b77aa125ed1e108a10 jonatack: ACK b6c748f84909212dce73e4b77aa125ed1e108a10, only changes appear to be rebase for https://github.com/bitcoin/bitcoin/pull/15730#discussion_r280030617 and release notes. Tree-SHA512: 8ee98f971c15f66ce8138fc92c55e51abc9faf01866a31ac7ce2ad766aa2bb88559eabee3b5815d645c84cdf1c19dc35ec03f31461e39bc5f6040edec0b87116
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 071ae23e1b..1a9e640a8a 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1786,8 +1786,9 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
}
double progress_current = progress_begin;
while (block_height && !fAbortRescan && !chain().shutdownRequested()) {
+ m_scanning_progress = (progress_current - progress_begin) / (progress_end - progress_begin);
if (*block_height % 100 == 0 && progress_end - progress_begin > 0.0) {
- ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), std::max(1, std::min(99, (int)((progress_current - progress_begin) / (progress_end - progress_begin) * 100))));
+ ShowProgress(strprintf("%s " + _("Rescanning..."), GetDisplayName()), std::max(1, std::min(99, (int)(m_scanning_progress * 100))));
}
if (GetTime() >= nNow + 60) {
nNow = GetTime();