mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge d9f5132736 into merged_master (Bitcoin PR #20344)
This commit is contained in:
commit
e198740eb1
2 changed files with 5 additions and 2 deletions
|
|
@ -1838,7 +1838,11 @@ CWallet::ScanResult CWallet::ScanForWalletTransactions(const uint256& start_bloc
|
|||
double progress_current = progress_begin;
|
||||
int block_height = start_height;
|
||||
while (!fAbortRescan && !chain().shutdownRequested()) {
|
||||
m_scanning_progress = (progress_current - progress_begin) / (progress_end - progress_begin);
|
||||
if (progress_end - progress_begin > 0.0) {
|
||||
m_scanning_progress = (progress_current - progress_begin) / (progress_end - progress_begin);
|
||||
} else { // avoid divide-by-zero for single block scan range (i.e. start and stop hashes are equal)
|
||||
m_scanning_progress = 0;
|
||||
}
|
||||
if (block_height % 100 == 0 && progress_end - progress_begin > 0.0) {
|
||||
ShowProgress(strprintf("%s " + _("Rescanning...").translated, GetDisplayName()), std::max(1, std::min(99, (int)(m_scanning_progress * 100))));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
# -fsanitize=undefined suppressions
|
||||
# =================================
|
||||
float-divide-by-zero:validation.cpp
|
||||
float-divide-by-zero:wallet/wallet.cpp
|
||||
|
||||
# -fsanitize=integer suppressions
|
||||
# ===============================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue