Skip to content

Commit 4a64ab8

Browse files
committed
4.0.4.0-leisure
Fixed: - Adds back the new user wizard inadvertently removed #1464 (@jamescowens). - Repair scraper team filtering #1466 (@jamescowens).
2 parents 01c88b0 + 6a9c908 commit 4a64ab8

File tree

5 files changed

+59
-14
lines changed

5 files changed

+59
-14
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [4.0.4.0] 2019-05-16, leisure
8+
### Fixed
9+
- Adds back the new user wizard inadvertently removed #1464 (@jamescowens).
10+
- Repair scraper team filtering #1466 (@jamescowens).
11+
712
## [4.0.3.0] 2019-05-10, leisure
813
### Added
914
- Replace NeuralNetwork with portable C++ scraper #1387 (@jamescowens,

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
22
AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 4)
44
define(_CLIENT_VERSION_MINOR, 0)
5-
define(_CLIENT_VERSION_REVISION, 3)
5+
define(_CLIENT_VERSION_REVISION, 4)
66
define(_CLIENT_VERSION_BUILD, 0)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
88
define(_COPYRIGHT_YEAR, 2019)

src/qt/bitcoingui.cpp

+42-11
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@ void BitcoinGUI::createActions()
315315
diagnosticsAction->setStatusTip(tr("Diagnostics"));
316316
diagnosticsAction->setMenuRole(QAction::TextHeuristicRole);
317317

318+
newUserWizardAction = new QAction(tr("&New User Wizard"), this);
319+
newUserWizardAction->setStatusTip(tr("New User Wizard"));
320+
newUserWizardAction->setMenuRole(QAction::TextHeuristicRole);
321+
318322
optionsAction = new QAction(tr("&Options..."), this);
319323
optionsAction->setToolTip(tr("Modify configuration options for Gridcoin"));
320324
optionsAction->setMenuRole(QAction::PreferencesRole);
@@ -350,6 +354,7 @@ void BitcoinGUI::createActions()
350354
connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
351355
connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
352356
connect(diagnosticsAction, SIGNAL(triggered()), this, SLOT(diagnosticsClicked()));
357+
connect(newUserWizardAction, SIGNAL(triggered()), this, SLOT(newUserWizardClicked()));
353358
}
354359

355360
void BitcoinGUI::setIcons()
@@ -372,6 +377,7 @@ void BitcoinGUI::setIcons()
372377
boincAction->setIcon(QPixmap(":/images/boinc"));
373378
quitAction->setIcon(QPixmap(":/icons/quit"));
374379
aboutAction->setIcon(QPixmap(":/images/gridcoin"));
380+
newUserWizardAction->setIcon(QPixmap(":/images/gridcoin"));
375381
diagnosticsAction->setIcon(QPixmap(":/images/gridcoin"));
376382
optionsAction->setIcon(QPixmap(":/icons/options"));
377383
toggleHideAction->setIcon(QPixmap(":/images/gridcoin"));
@@ -409,6 +415,10 @@ void BitcoinGUI::createMenuBar()
409415
settings->addAction(unlockWalletAction);
410416
settings->addAction(lockWalletAction);
411417
settings->addSeparator();
418+
// This new wizard menu item is disabled until we make the wizard more advanced, because the existing one it makes no sense
419+
// to run it after the conf file is created.
420+
//settings->addAction(newUserWizardAction);
421+
//settings->addSeparator();
412422
settings->addAction(optionsAction);
413423

414424
QMenu *community = appMenuBar->addMenu(tr("&Community"));
@@ -853,6 +863,12 @@ bool CreateNewConfigFile(std::string boinc_email)
853863
myConfig << row;
854864
row = "addnode=seeds.gridcoin.ifoggz-network.xyz \r\n";
855865
myConfig << row;
866+
row = "addnode=ec2-3-81-39-58.compute-1.amazonaws.com \r\n";
867+
myConfig << row;
868+
row = "addnode=addnode-us-central.cycy.me \r\n";
869+
myConfig << row;
870+
row = "addnode=gridcoin.ddns.net \r\n";
871+
myConfig << row;
856872
myConfig.close();
857873
return true;
858874
}
@@ -872,7 +888,8 @@ bool ForceInAddNode(std::string sMyAddNode)
872888

873889
void BitcoinGUI::NewUserWizard()
874890
{
875-
if (!IsConfigFileEmpty()) return;
891+
if (IsConfigFileEmpty())
892+
{
876893
QString boincemail = "";
877894
//Typhoon- Check to see if boinc exists in default path - 11-19-2014
878895

@@ -883,17 +900,18 @@ void BitcoinGUI::NewUserWizard()
883900
std::string sBoincNarr = "";
884901
if (sout == "-1")
885902
{
886-
LogPrintf("Boinc not installed in default location! ");
903+
LogPrintf("BOINC not installed in default location! ");
887904
//BoincInstalled=false;
888905
std::string nicePath = GetBoincDataDir();
889-
sBoincNarr = "Boinc is not installed in default location " + nicePath + "! Please set boincdatadir=c:\\programdata\\boinc\\ to the correct path where Boincs programdata directory resides.";
906+
sBoincNarr = "BOINC is not installed in the default location " + nicePath + "! Please set boincdatadir in the gridcoinresearch.conf file to the correct path where the BOINC client_state.xml file resides.";
890907
}
891908

892909
bool ok;
893910
boincemail = QInputDialog::getText(this, tr("New User Wizard"),
894911
tr("Please enter your boinc E-mail address, or click <Cancel> to skip for now:"),
895912
QLineEdit::Normal,
896913
"", &ok);
914+
897915
if (ok && !boincemail.isEmpty())
898916
{
899917
std::string new_email = tostdstring(boincemail);
@@ -910,26 +928,26 @@ void BitcoinGUI::NewUserWizard()
910928
{
911929
//Create Config File
912930
CreateNewConfigFile("investor");
913-
QString strMessage = tr("To get started with Boinc, run the boinc client, choose projects, then populate the gridcoinresearch.conf file in %appdata%\\GridcoinResearch with your boinc e-mail address. To run this wizard again, please delete the gridcoinresearch.conf file. ");
931+
QString strMessage = tr("To get started with BOINC, run the BOINC client, choose projects, then populate the gridcoinresearch.conf file in %appdata%\\GridcoinResearch with your boinc e-mail address. To run this wizard again, please delete the gridcoinresearch.conf file. ");
914932
QMessageBox::warning(this, tr("New User Wizard - Skipped"), strMessage);
915933
}
916934
// Read in the mapargs, and set the seed nodes 10-13-2015
917935
ReadConfigFile(mapArgs, mapMultiArgs);
936+
918937
//Force some addnodes in to get user started
919938
ForceInAddNode("node.gridcoin.us");
920-
ForceInAddNode("london.grcnode.co.uk");
921-
ForceInAddNode("gridcoin.crypto.fans");
922-
ForceInAddNode("seeds.gridcoin.ifoggz-network.xyz");
923-
ForceInAddNode("nuad.de");
924939
ForceInAddNode("www.grcpool.com");
940+
ForceInAddNode("seeds.gridcoin.ifoggz-network.xyz");
941+
ForceInAddNode("ec2-3-81-39-58.compute-1.amazonaws.com");
942+
ForceInAddNode("addnode-us-central.cycy.me");
943+
ForceInAddNode("gridcoin.ddns.net");
925944

926945
if (sBoincNarr != "")
927946
{
928947
QString qsMessage = tr(sBoincNarr.c_str());
929948
QMessageBox::warning(this, tr("Attention! - Boinc Path Error!"), qsMessage);
930949
}
931-
932-
950+
}
933951
}
934952

935953

@@ -976,6 +994,12 @@ void BitcoinGUI::diagnosticsClicked()
976994
diagnosticsDialog->activateWindow();
977995
}
978996

997+
// Note this is for the menu item. The menu item is disabled until we implement a more advanced wizard.
998+
void BitcoinGUI::newUserWizardClicked()
999+
{
1000+
NewUserWizard();
1001+
}
1002+
9791003
// links to websites and services outside the gridcoin client
9801004
void BitcoinGUI::bxClicked()
9811005
{
@@ -1298,7 +1322,14 @@ void BitcoinGUI::timerfire()
12981322
{
12991323
try
13001324
{
1301-
// TODO: Check if these SetRPCResponse calls are really needed.
1325+
static bool bNewUserWizardNotified = false;
1326+
if (!bNewUserWizardNotified)
1327+
{
1328+
bNewUserWizardNotified=true;
1329+
NewUserWizard();
1330+
}
1331+
1332+
// TODO: Check if these SetRPCResponse calls are really needed.
13021333
/*if (bGlobalcomInitialized)
13031334
{
13041335
//R Halford - Allow .NET to talk to Core: 6-21-2015

src/qt/bitcoingui.h

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class BitcoinGUI : public QMainWindow
9292
QAction *exchangeAction;
9393
QAction *votingAction;
9494
QAction *diagnosticsAction;
95+
QAction *newUserWizardAction;
9596
QAction *verifyMessageAction;
9697
QAction *aboutAction;
9798
QAction *receiveCoinsAction;
@@ -194,6 +195,8 @@ private slots:
194195
void chatClicked();
195196
void diagnosticsClicked();
196197

198+
void newUserWizardClicked();
199+
197200
#ifndef Q_OS_MAC
198201
/** Handle tray icon clicked */
199202
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);

src/scraper/scraper.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -1698,6 +1698,9 @@ bool ProcessProjectRacFileByCPID(const std::string& project, const fs::path& fil
16981698
// Only do this if team membership filtering is specified by network policy.
16991699
if (REQUIRE_TEAM_WHITELIST_MEMBERSHIP)
17001700
{
1701+
// Set initial flag for whether user is on team whitelist to false.
1702+
bool bOnTeamWhitelist = false;
1703+
17011704
const std::string& sTeamID = ExtractXML(data, "<teamid>", "</teamid>");
17021705
int64_t nTeamID = 0;
17031706

@@ -1711,12 +1714,15 @@ bool ProcessProjectRacFileByCPID(const std::string& project, const fs::path& fil
17111714
continue;
17121715
}
17131716

1714-
// Check to see if the user's team ID is in the whitelist team ID map for the project. If not continue.
1717+
// Check to see if the user's team ID is in the whitelist team ID map for the project.
17151718
for (auto const& iTeam : mTeamIDsForProject)
17161719
{
17171720
if (iTeam.second == nTeamID)
1718-
continue;
1721+
bOnTeamWhitelist = true;
17191722
}
1723+
1724+
//If not continue the while loop and do not put the users stats for that project in the outputstatistics file.
1725+
if (!bOnTeamWhitelist) continue;
17201726
}
17211727

17221728
// User beacon verified. Append its statistics to the CSV output.

0 commit comments

Comments
 (0)