From de42859bd0e4441e00db4151272e9c682a052d56 Mon Sep 17 00:00:00 2001 From: "James C. Owens" Date: Sat, 19 Aug 2023 18:47:43 -0400 Subject: [PATCH 1/3] Add missing \n on hasPendingBeacon() notification tooltip --- src/qt/bitcoingui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index d3bf86fb9a..f09f8b6305 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1884,7 +1884,7 @@ void BitcoinGUI::updateBeaconIcon() if (researcherModel->hasPendingBeacon()) { labelBeaconIcon->setToolTip(tr("CPID: %1\n" - "Time left to activate: %2" + "Time left to activate: %2\n" "%3") .arg(researcherModel->formatCpid(), researcherModel->formatTimeToPendingBeaconExpiration(), From 9ddf712bfea3a8d428d14377c2b0389a15fdb1ad Mon Sep 17 00:00:00 2001 From: "James C. Owens" Date: Sat, 19 Aug 2023 19:15:06 -0400 Subject: [PATCH 2/3] Add expiry check for pending beacon to hasPendingBeacon method --- src/qt/researcher/researchermodel.cpp | 12 +++++++++++- src/qt/researcher/researchermodel.h | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/qt/researcher/researchermodel.cpp b/src/qt/researcher/researchermodel.cpp index b75b24dfa9..a6062c50ba 100644 --- a/src/qt/researcher/researchermodel.cpp +++ b/src/qt/researcher/researchermodel.cpp @@ -276,7 +276,17 @@ bool ResearcherModel::hasActiveBeacon() const bool ResearcherModel::hasPendingBeacon() const { - return m_pending_beacon.operator bool(); + if (!m_pending_beacon.operator bool()) { + return false; + } + + // If here, a pending beacon is present. Determine if expired + // while pending. No need to actually clean the pending entry + // up. It will be eventually cleaned by the contract handler via + // the ActivatePending call. + GRC::PendingBeacon pending_beacon(*m_pending_beacon); + + return !pending_beacon.PendingExpired(GetAdjustedTime()); } bool ResearcherModel::hasRenewableBeacon() const diff --git a/src/qt/researcher/researchermodel.h b/src/qt/researcher/researchermodel.h index dd353a9807..8d6b6df341 100644 --- a/src/qt/researcher/researchermodel.h +++ b/src/qt/researcher/researchermodel.h @@ -93,6 +93,11 @@ class ResearcherModel : public QObject bool hasEligibleProjects() const; bool hasPoolProjects() const; bool hasActiveBeacon() const; + + //! + //! \brief hasPendingBeacon returns true if m_pending_beacon is not null and also not expired while pending. + //! \return boolean + //! bool hasPendingBeacon() const; bool hasRenewableBeacon() const; bool beaconExpired() const; From d79f4312f7828efe31e3d60a0f9a0e2eacd9cb78 Mon Sep 17 00:00:00 2001 From: "James C. Owens" Date: Sun, 20 Aug 2023 18:27:31 -0400 Subject: [PATCH 3/3] Bump zlib to 1.3 in depends to resolve resource not found error --- depends/packages/zlib.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depends/packages/zlib.mk b/depends/packages/zlib.mk index 722dcf642a..8a2432b8ff 100644 --- a/depends/packages/zlib.mk +++ b/depends/packages/zlib.mk @@ -1,8 +1,8 @@ package=zlib -$(package)_version=1.2.13 +$(package)_version=1.3 $(package)_download_path=https://www.zlib.net $(package)_file_name=$(package)-$($(package)_version).tar.gz -$(package)_sha256_hash=b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30 +$(package)_sha256_hash=ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e define $(package)_set_vars $(package)_config_opts= CC="$($(package)_cc)"