Skip to content

Commit

Permalink
Merge pull request #2671 from jamescowens/fix_beacon_status_update_fr…
Browse files Browse the repository at this point in the history
…equency

gui: Add one minute QTimer to update beacon age/expiration in tooltip
  • Loading branch information
jamescowens authored Mar 31, 2023
2 parents 12e2aa9 + c443072 commit 2121748
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,15 @@ void BitcoinGUI::setResearcherModel(ResearcherModel *researcherModel)

updateBeaconIcon();
connect(researcherModel, &ResearcherModel::beaconChanged, this, &BitcoinGUI::updateBeaconIcon);

QTimer *beacon_status_update_timer = new QTimer(this);

// This timer trigger is to support updating the beacon age and time to expiration in the tooltip.
// Once a minute is sufficient.
connect(beacon_status_update_timer, &QTimer::timeout, this, &BitcoinGUI::updateBeaconIcon);

// Check every minute
beacon_status_update_timer->start(1000 * 60);
}

void BitcoinGUI::setMRCModel(MRCModel *mrcModel)
Expand Down

0 comments on commit 2121748

Please sign in to comment.