]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
breaking commit? why?
authorgg <chown_tee@proton.me>
Sat, 10 Jan 2026 14:43:07 +0000 (09:43 -0500)
committergg <chown_tee@proton.me>
Sat, 10 Jan 2026 14:43:07 +0000 (09:43 -0500)
src/MainWindow.cpp
src/utils/Utils.cpp

index 7b58f564450c6f4feea8838e0f7f06249bf1f85c..d15bf3494655e719120d6b9982bc0117a13cc84e 100644 (file)
@@ -998,13 +998,8 @@ void MainWindow::onSyncStatus(quint64 height, quint64 target, bool daemonSync) {
         // and we are blocksLeft behind out of (target-1) total blocks (since block 0 is genesis)
         double approximateSizeMB = 0.0;
         if (target > 1) {
-            approximateSizeMB = (blocksLeft * 500.0) / (target - 1);
-        }
-        QString sizeText;
-        if (approximateSizeMB < 1) {
-            sizeText = QString("%1 KB").arg(QString::number(approximateSizeMB * 1024, 'f', 0));
-        } else {
-            sizeText = QString("%1 MB").arg(QString::number(approximateSizeMB, 'f', 1));
+             quint64 estimatedBytes = Utils::estimateSyncDataSize(blocksLeft);
+             sizeText = Utils::formatBytes(estimatedBytes);
         }
         QString statusMsg = Utils::formatSyncStatus(height, target, daemonSync);
         // Shows "# blocks remaining (approx. X MB)" to sync
index 0ef06d99324976b6c67e30763d2dce41b49aa6ca..55260154343ce862c2cfa9d5253335b5d3bb9a2d 100644 (file)
@@ -723,8 +723,8 @@ QString formatSyncTimeEstimate(quint64 blocks) {
 }
 
 quint64 estimateSyncDataSize(quint64 blocks) {
-    // Estimate 1024 bytes per block (1KB) for wallet scanning.
-    return blocks * 1024;
+    // Estimate 30KB per block for wallet scanning.
+    return blocks * 30 * 1024;
 }
 
 QString formatPausedSyncStatus(quint64 blocks) {
@@ -752,7 +752,9 @@ QString getPausedSyncStatus(Wallet *wallet, Nodes *nodes, QString *tooltip) {
         if (tooltip) {
             *tooltip = QString("Wallet Height: %1 | Network Tip: %2").arg(walletHeight).arg(daemonHeight);
         }
-        quint64 blocksBehind = (daemonHeight > startHeight) ? (daemonHeight - startHeight) : 0;
+        if (blocksBehind == 0) {
+            return "[PAUSED] Sync paused";
+        }
         return formatPausedSyncStatus(blocksBehind);
     }