lock: add sync status

This commit is contained in:
tobtoht
2023-12-30 14:17:11 +01:00
parent 6a3b3fc830
commit 082413dc0d
9 changed files with 79 additions and 35 deletions
+10
View File
@@ -708,4 +708,14 @@ void clearLayout(QLayout* layout, bool deleteWidgets)
delete item;
}
}
QString formatSyncStatus(quint64 height, quint64 target, bool daemonSync) {
if (height < (target - 1)) {
QString blocks = (target >= height) ? QString::number(target - height) : "?";
QString type = daemonSync ? "Blockchain" : "Wallet";
return QString("%1 sync: %2 blocks remaining").arg(type, blocks);
}
return "Synchronized";
}
}