Skip to content

Commit cdc2349

Browse files
committed
Correct progress display on searchdeterministiczerocoin
The progress items of the individual threads have already accounted for their start points, so we don't need to subtract the overall start point again.
1 parent 5d431f3 commit cdc2349

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/veil/zerocoin/zwallet.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ bool CzWallet::DeterministicSearch(int nCountStart, int nCountEnd, int* nThreade
392392
}
393393
}
394394

395-
int percentageDone = std::max(1, std::min(99, (int)((progress_current - progress_begin) / (progress_end - progress_begin) * 100)));
395+
// items complete = progress_current
396+
// items total = progress_end - progress_begin
397+
int percentageDone = std::max(1, std::min(99, (int)(progress_current / (progress_end - progress_begin) * 100)));
396398
uiInterface.ShowProgress(_("Searching..."), percentageDone, 0);
397399
}
398400
if (nThreadedProgress == nullptr) {

0 commit comments

Comments
 (0)