Skip to content

Commit c33982a

Browse files
authored
Merge pull request gridcoin-community#2110 from cyrossignol/fix-no-beacon
gui: Fix "no active beacon" status
2 parents 6fcdc3a + 263ce49 commit c33982a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/qt/researcher/researchermodel.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -560,13 +560,12 @@ void ResearcherModel::updateBeacon()
560560

561561
if (beacon_key_present) {
562562
beacon_status = MapAdvertiseBeaconError(m_researcher->BeaconError());
563+
} else if (!beacon && !pending_beacon) {
564+
beacon_status = BeaconStatus::NO_BEACON;
563565
} else {
564566
beacon_status = BeaconStatus::ERROR_MISSING_KEY;
565567
}
566568

567-
// If automatic advertisement/renewal encountered a problem, raise this
568-
// error first:
569-
//
570569
if (beacon_status != BeaconStatus::ACTIVE) {
571570
commitBeacon(beacon_status, beacon, pending_beacon);
572571
} else if (pending_beacon) {
@@ -583,8 +582,6 @@ void ResearcherModel::updateBeacon()
583582
} else {
584583
commitBeacon(BeaconStatus::ACTIVE, beacon, pending_beacon);
585584
}
586-
} else {
587-
commitBeacon(BeaconStatus::NO_BEACON, beacon, pending_beacon);
588585
}
589586
}
590587

0 commit comments

Comments
 (0)