Show blockheight in statusbar when synced

This commit is contained in:
MasFlam 2023-06-28 03:23:42 +02:00
parent 3a18726170
commit f264d88006
No known key found for this signature in database
GPG key ID: 76B56F04FA4B8C8B
4 changed files with 7 additions and 6 deletions

View file

@ -664,9 +664,10 @@ void MainWindow::onMultiBroadcast(const QMap<QString, QString> &txHexMap) {
}
}
void MainWindow::onSynchronized() {
void MainWindow::onSynchronized(int height, int target) {
QString heightText = QString("Synchronized at height %1").arg(QString::number(height));
this->updateNetStats();
this->setStatusText("Synchronized");
this->setStatusText(heightText);
}
void MainWindow::onBlockchainSync(int height, int target) {
@ -1751,4 +1752,4 @@ void MainWindow::toggleSearchbar(bool visible) {
MainWindow::~MainWindow() {
qDebug() << "~MainWindow";
}
}

View file

@ -155,7 +155,7 @@ private slots:
// libwalletqt
void onBalanceUpdated(quint64 balance, quint64 spendable);
void onSynchronized();
void onSynchronized(int height, int target);
void onWalletOpened();
void onConnectionStatusChanged(int status);
void onCreateTransactionError(const QString &message);

View file

@ -410,7 +410,7 @@ void Wallet::syncStatusUpdated(quint64 height, quint64 target) {
}
else {
this->updateBalance();
emit synchronized();
emit synchronized(height, target);
}
}

View file

@ -424,7 +424,7 @@ signals:
void refreshSync(int height, int target);
void blockchainSync(int height, int target);
void synchronized();
void synchronized(int height, int target);
void balanceUpdated(quint64 balance, quint64 spendable);
void keysCorrupted();