diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 579eb5ea20..b3058dc48c 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1841,15 +1841,24 @@ void BitcoinGUI::updateBeaconIcon() labelBeaconIcon->show(); labelBeaconIcon->setPixmap(GRC::ScaleStatusIcon(this, researcherModel->getBeaconStatusIcon())); - labelBeaconIcon->setToolTip(tr( - "CPID: %1\n" - "Beacon age: %2\n" - "Expires: %3\n" - "%4") - .arg(researcherModel->formatCpid()) - .arg(researcherModel->formatBeaconAge()) - .arg(researcherModel->formatTimeToBeaconExpiration()) - .arg(researcherModel->formatBeaconStatus())); + if (researcherModel->beaconExpired()) { + labelBeaconIcon->setToolTip(tr("CPID: %1\n" + "Beacon age: %2\n" + "Current beacon expired!\n" + "%3") + .arg(researcherModel->formatCpid()) + .arg(researcherModel->formatBeaconAge()) + .arg(researcherModel->formatBeaconStatus())); + } else { + labelBeaconIcon->setToolTip(tr("CPID: %1\n" + "Beacon age: %2\n" + "Expires: %3\n" + "%4") + .arg(researcherModel->formatCpid()) + .arg(researcherModel->formatBeaconAge()) + .arg(researcherModel->formatTimeToBeaconExpiration()) + .arg(researcherModel->formatBeaconStatus())); + } } void BitcoinGUI::handleNewPoll() diff --git a/src/qt/researcher/researchermodel.cpp b/src/qt/researcher/researchermodel.cpp index 89e8006e10..e9661c6c6c 100644 --- a/src/qt/researcher/researchermodel.cpp +++ b/src/qt/researcher/researchermodel.cpp @@ -271,6 +271,11 @@ bool ResearcherModel::hasRenewableBeacon() const return m_beacon && m_beacon->Renewable(GetAdjustedTime()); } +bool ResearcherModel::beaconExpired() const +{ + return m_beacon->Expired(GetAdjustedTime()); +} + bool ResearcherModel::hasMagnitude() const { return m_researcher->Magnitude() != 0; diff --git a/src/qt/researcher/researchermodel.h b/src/qt/researcher/researchermodel.h index 36ab9a53ba..4d28085a80 100644 --- a/src/qt/researcher/researchermodel.h +++ b/src/qt/researcher/researchermodel.h @@ -92,6 +92,7 @@ class ResearcherModel : public QObject bool hasActiveBeacon() const; bool hasPendingBeacon() const; bool hasRenewableBeacon() const; + bool beaconExpired() const; bool hasMagnitude() const; bool hasRAC() const; bool hasSplitCpid() const;