mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 15:21:30 +02:00
don't report 0% progress if no subsequent progress to report
This commit is contained in:
@@ -43,6 +43,7 @@ namespace monero {
|
||||
// notify listeners of sync start
|
||||
uint64_t numBlocksDone = 0;
|
||||
uint64_t numBlocksTotal = *syncEndHeight - *syncStartHeight + 1;
|
||||
if (numBlocksTotal < 1) return; // don't report 0% progress if no subsequent progress to report
|
||||
double percentDone = numBlocksDone / (double) numBlocksTotal;
|
||||
string message = string("Synchronizing");
|
||||
if (this->listener != nullptr) this->listener->onSyncProgress(*syncStartHeight, numBlocksDone, numBlocksTotal, percentDone, message);
|
||||
|
||||
Reference in New Issue
Block a user