Skip to content

Commit

Permalink
Fix "no beacon" GUI status
Browse files Browse the repository at this point in the history
The detection for a missing beacon private key overrides the status for
when a CPID has no active beacon at all.
  • Loading branch information
cyrossignol committed Apr 21, 2021
1 parent 37054c8 commit 263ce49
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/qt/researcher/researchermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -583,8 +582,6 @@ void ResearcherModel::updateBeacon()
} else {
commitBeacon(BeaconStatus::ACTIVE, beacon, pending_beacon);
}
} else {
commitBeacon(BeaconStatus::NO_BEACON, beacon, pending_beacon);
}
}

Expand Down

0 comments on commit 263ce49

Please sign in to comment.