From 263ce49461875bc33e915358ff011bc62885dd51 Mon Sep 17 00:00:00 2001 From: Cy Rossignol Date: Tue, 20 Apr 2021 21:15:07 -0500 Subject: [PATCH] Fix "no beacon" GUI status The detection for a missing beacon private key overrides the status for when a CPID has no active beacon at all. --- src/qt/researcher/researchermodel.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qt/researcher/researchermodel.cpp b/src/qt/researcher/researchermodel.cpp index 5708cf1d54..481411ea93 100644 --- a/src/qt/researcher/researchermodel.cpp +++ b/src/qt/researcher/researchermodel.cpp @@ -560,13 +560,12 @@ void ResearcherModel::updateBeacon() if (beacon_key_present) { beacon_status = MapAdvertiseBeaconError(m_researcher->BeaconError()); + } else if (!beacon && !pending_beacon) { + beacon_status = BeaconStatus::NO_BEACON; } else { beacon_status = BeaconStatus::ERROR_MISSING_KEY; } - // If automatic advertisement/renewal encountered a problem, raise this - // error first: - // if (beacon_status != BeaconStatus::ACTIVE) { commitBeacon(beacon_status, beacon, pending_beacon); } else if (pending_beacon) { @@ -583,8 +582,6 @@ void ResearcherModel::updateBeacon() } else { commitBeacon(BeaconStatus::ACTIVE, beacon, pending_beacon); } - } else { - commitBeacon(BeaconStatus::NO_BEACON, beacon, pending_beacon); } }