From 29c90e409a0e092b3404c72aa4184206b8c6e86b Mon Sep 17 00:00:00 2001 From: gg Date: Sat, 10 Jan 2026 09:43:07 -0500 Subject: [PATCH] breaking commit? why? --- src/MainWindow.cpp | 9 ++------- src/utils/Utils.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 7b58f564..d15bf349 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -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 diff --git a/src/utils/Utils.cpp b/src/utils/Utils.cpp index 0ef06d99..55260154 100644 --- a/src/utils/Utils.cpp +++ b/src/utils/Utils.cpp @@ -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); } -- 2.52.0