Skip to content

Commit c59fcc6

Browse files
committed
Modify warning message for split CPID/mismatched email
1 parent e40a782 commit c59fcc6

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

src/gridcoin/researcher.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,8 +1219,15 @@ void Researcher::Reload(MiningProjectMap projects, GRC::BeaconError beacon_error
12191219

12201220
bool has_split_cpid = false;
12211221

1222-
if (const CpidOption cpid = mining_id.TryCpid()) {
1222+
// SplitCpid currently can occur if EITHER project have the right email but thed CPID is not converged, OR
1223+
// the email is mismatched between them or this client, or BOTH. Right now it is too hard to tease all of that
1224+
// out without significant replumbing. So instead if projects not empty run the DetectSplitCpid regardless
1225+
// of whether the mining_id has actually been populated.
1226+
if (!projects.empty()) {
12231227
has_split_cpid = DetectSplitCpid(projects);
1228+
}
1229+
1230+
if (const CpidOption cpid = mining_id.TryCpid()) {
12241231
LogPrintf("Selected primary CPID: %s", cpid->ToString());
12251232
} else if (!projects.empty()) {
12261233
LogPrintf("WARNING: no projects eligible for research rewards.");

src/qt/researcher/researcherwizardsummarypage.cpp

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Distributed under the MIT/X11 software license, see the accompanying
33
// file COPYING or https://opensource.org/licenses/mit-license.php.
44

5+
#include "logging.h"
6+
57
#include "qt/bitcoinunits.h"
68
#include "qt/decoration.h"
79
#include "qt/forms/ui_researcherwizardsummarypage.h"
@@ -114,6 +116,7 @@ void ResearcherWizardSummaryPage::refreshOverallStatus()
114116
const int icon_size = ui->overallStatusIconLabel->width();
115117

116118
QString status;
119+
QString status_tooltip;
117120
QIcon icon;
118121

119122
if (m_researcher_model->outOfSync()) {
@@ -125,21 +128,26 @@ void ResearcherWizardSummaryPage::refreshOverallStatus()
125128
} else if (m_researcher_model->hasRenewableBeacon()) {
126129
status = tr("Beacon renewal available.");
127130
icon = QIcon(":/icons/warning");
131+
} else if (m_researcher_model->hasSplitCpid()) {
132+
status = tr("Split CPID or mismatched email.");
133+
status_tooltip = tr("Your projects either refer to more than one CPID or your projects\' email do not match "
134+
"what you used to configure Gridcoin here. Please ensure all of your projects are attached "
135+
"using the same email address, the email address matches what was configured here, and if "
136+
"you added a project recently, update that project and then all other projects using the "
137+
"update button in the BOINC manager, then restart the client and recheck.");
138+
icon = QIcon(":/icons/warning");
128139
} else if (!m_researcher_model->hasMagnitude()) {
129140
status = tr("Waiting for magnitude.");
130141
icon = QIcon(":/icons/scraper_waiting_light");
131-
} else if (m_researcher_model->hasSplitCpid()) {
132-
status = tr("Likely split CPID - projects refer to more than one CPID. Please ensure all\n"
133-
"of your projects are attached using the same email address and if you added\n"
134-
"a project recently, update that project and then all other projects using the\n"
135-
"update button in the BOINC manager, then go to the projects tab and refresh.");
136-
icon = QIcon(":/icons/warning");
137142
} else {
138143
status = tr("Everything looks good.");
139144
icon = QIcon(":/icons/round_green_check");
140145
}
141146

142147
ui->overallStatusLabel->setText(status);
148+
149+
if (!status_tooltip.isEmpty()) ui->overallStatusLabel->setToolTip(status_tooltip);
150+
143151
ui->overallStatusIconLabel->setPixmap(icon.pixmap(icon_size, icon_size));
144152
}
145153

0 commit comments

Comments
 (0)