Skip to content

Commit e68fbb0

Browse files
committed
3.5.7.1-leisure
Gridcoin Research 3.5.7.1/MSI=40.6 Leisure Upgrade - Verify compile on Arch - Verify code does not restart client during initial syncing - Bubble error handler messagebox while submitting expense
1 parent 9b50f7e commit e68fbb0

File tree

8 files changed

+65
-75
lines changed

8 files changed

+65
-75
lines changed

Makefile.Debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#############################################################################
22
# Makefile for building: gridcoinresearch
3-
# Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Jul 21 22:07:19 2016
3+
# Generated by qmake (2.01a) (Qt 4.8.4) on: Sat Jul 23 11:19:53 2016
44
# Project: gridcoinresearch.pro
55
# Template: app
66
#############################################################################

Makefile.Release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#############################################################################
22
# Makefile for building: gridcoinresearch
3-
# Generated by qmake (2.01a) (Qt 4.8.4) on: Thu Jul 21 22:07:19 2016
3+
# Generated by qmake (2.01a) (Qt 4.8.4) on: Sat Jul 23 11:19:54 2016
44
# Project: gridcoinresearch.pro
55
# Template: app
66
#############################################################################

contrib/Installer/GridcoinInstaller/GridcoinResearch.vdproj

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,19 @@
232232
"Entry"
233233
{
234234
"MsmKey" = "8:_UNDEFINED"
235-
"OwnerKey" = "8:_D0966638AB084779AFD69795C33FC8EB"
235+
"OwnerKey" = "8:_6408A3D03D15E306A4C3FC5FD95ADA69"
236236
"MsmSig" = "8:_UNDEFINED"
237237
}
238238
"Entry"
239239
{
240240
"MsmKey" = "8:_UNDEFINED"
241-
"OwnerKey" = "8:_7A0EA93E644A4D9E8037FBB3C062DD65"
241+
"OwnerKey" = "8:_32F2DC723F30362B0B78F9A291EC0098"
242242
"MsmSig" = "8:_UNDEFINED"
243243
}
244244
"Entry"
245245
{
246246
"MsmKey" = "8:_UNDEFINED"
247-
"OwnerKey" = "8:_6AEABB5004EC4B57225B51B085DB5625"
247+
"OwnerKey" = "8:_DEB886DE05C496A5AD26B43C4B1B90B9"
248248
"MsmSig" = "8:_UNDEFINED"
249249
}
250250
"Entry"
@@ -256,19 +256,19 @@
256256
"Entry"
257257
{
258258
"MsmKey" = "8:_UNDEFINED"
259-
"OwnerKey" = "8:_DEB886DE05C496A5AD26B43C4B1B90B9"
259+
"OwnerKey" = "8:_6AEABB5004EC4B57225B51B085DB5625"
260260
"MsmSig" = "8:_UNDEFINED"
261261
}
262262
"Entry"
263263
{
264264
"MsmKey" = "8:_UNDEFINED"
265-
"OwnerKey" = "8:_32F2DC723F30362B0B78F9A291EC0098"
265+
"OwnerKey" = "8:_7A0EA93E644A4D9E8037FBB3C062DD65"
266266
"MsmSig" = "8:_UNDEFINED"
267267
}
268268
"Entry"
269269
{
270270
"MsmKey" = "8:_UNDEFINED"
271-
"OwnerKey" = "8:_6408A3D03D15E306A4C3FC5FD95ADA69"
271+
"OwnerKey" = "8:_D0966638AB084779AFD69795C33FC8EB"
272272
"MsmSig" = "8:_UNDEFINED"
273273
}
274274
}
@@ -463,11 +463,6 @@
463463
"AssemblyAsmDisplayName" = "8:GRCSec, Version=1.0.0.3, Culture=neutral, processorArchitecture=MSIL"
464464
"ScatterAssemblies"
465465
{
466-
"_32F2DC723F30362B0B78F9A291EC0098"
467-
{
468-
"Name" = "8:GRCSec.dll"
469-
"Attributes" = "3:512"
470-
}
471466
}
472467
"SourcePath" = "8:GRCSec.dll"
473468
"TargetName" = "8:"
@@ -585,11 +580,6 @@
585580
"AssemblyAsmDisplayName" = "8:OpenPop, Version=2.0.5.0, Culture=neutral, processorArchitecture=MSIL"
586581
"ScatterAssemblies"
587582
{
588-
"_5644D8F767F33372E534FBD5A2384D12"
589-
{
590-
"Name" = "8:openpopstake.dll"
591-
"Attributes" = "3:512"
592-
}
593583
}
594584
"SourcePath" = "8:openpopstake.dll"
595585
"TargetName" = "8:"
@@ -616,11 +606,6 @@
616606
"AssemblyAsmDisplayName" = "8:MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL"
617607
"ScatterAssemblies"
618608
{
619-
"_6408A3D03D15E306A4C3FC5FD95ADA69"
620-
{
621-
"Name" = "8:MySql.Data.dll"
622-
"Attributes" = "3:512"
623-
}
624609
}
625610
"SourcePath" = "8:MySql.Data.dll"
626611
"TargetName" = "8:"
@@ -647,11 +632,6 @@
647632
"AssemblyAsmDisplayName" = "8:SQLite.NET, Version=0.21.1869.3794, Culture=neutral, PublicKeyToken=c273bd375e695f9c"
648633
"ScatterAssemblies"
649634
{
650-
"_6AEABB5004EC4B57225B51B085DB5625"
651-
{
652-
"Name" = "8:sqlitestake.net.dll"
653-
"Attributes" = "3:512"
654-
}
655635
}
656636
"SourcePath" = "8:sqlitestake.net.dll"
657637
"TargetName" = "8:"
@@ -909,11 +889,6 @@
909889
"AssemblyAsmDisplayName" = "8:ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73"
910890
"ScatterAssemblies"
911891
{
912-
"_DEB886DE05C496A5AD26B43C4B1B90B9"
913-
{
914-
"Name" = "8:icsharpcode.sharpziplib.dll"
915-
"Attributes" = "3:512"
916-
}
917892
}
918893
"SourcePath" = "8:icsharpcode.sharpziplib.dll"
919894
"TargetName" = "8:"
@@ -1120,19 +1095,19 @@
11201095
{
11211096
"Name" = "8:Microsoft Visual Studio"
11221097
"ProductName" = "8:Gridcoin Research"
1123-
"ProductCode" = "8:{E6621A89-4C37-45A1-AC3F-DD5E299C02C9}"
1124-
"PackageCode" = "8:{BC3D09B4-C005-4A03-AB29-585E10E7FEA5}"
1098+
"ProductCode" = "8:{2A7BA5CE-9344-42F9-9A1E-6FD7D14BF83D}"
1099+
"PackageCode" = "8:{D240F656-F139-4D69-A1DA-3D6D0B3C419A}"
11251100
"UpgradeCode" = "8:{9617E9EA-252F-43CE-B53E-B48C85F71192}"
11261101
"AspNetVersion" = "8:4.0.30319.0"
11271102
"RestartWWWService" = "11:FALSE"
11281103
"RemovePreviousVersions" = "11:TRUE"
11291104
"DetectNewerInstalledVersion" = "11:FALSE"
11301105
"InstallAllUsers" = "11:TRUE"
1131-
"ProductVersion" = "8:40.5"
1106+
"ProductVersion" = "8:40.6"
11321107
"Manufacturer" = "8:GridcoinResearch"
11331108
"ARPHELPTELEPHONE" = "8:"
11341109
"ARPHELPLINK" = "8:"
1135-
"Title" = "8:Gridcoin Research 40.5"
1110+
"Title" = "8:Gridcoin Research 40.6"
11361111
"Subject" = "8:"
11371112
"ARPCONTACT" = "8:The Gridcoin Developers"
11381113
"Keywords" = "8:Gridcoin Research"

contrib/Installer/boinc/boinc/frmAddExpense.vb

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ Public Class frmAddExpense
1010
Private sHistoryGuid As String
1111

1212
Private Sub frmTicketAdd_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
13-
mGRCData = New GRCSec.GridcoinData
13+
Try
14+
mGRCData = New GRCSec.GridcoinData
15+
Catch ex As Exception
16+
MsgBox("Unable to load page " + ex.Message, MsgBoxStyle.Critical)
17+
Exit Sub
18+
End Try
1419
sHandle = KeyValue("TicketHandle")
15-
1620
Try
1721
If Mode <> "View" Then
1822
If sHandle = "" Then
@@ -143,12 +147,6 @@ Public Class frmAddExpense
143147
sTitle += "[Foundation_" + txtTicketId.Text + "]"
144148

145149
Dim sQuestion As String = IIf(sType = "Expense", "Approve_Expense?", "Approve_Campaign?")
146-
Dim sAnswers As String = "Approve;Deny"
147-
Dim sResult As String = ExecuteRPCCommand("addpoll", sTitle, "21", sQuestion, sAnswers, "3", "http://www.gridcoin.us")
148-
If Not LCase(sResult).Contains("success") Then
149-
MsgBox(sResult, MsgBoxStyle.Information, "Gridcoin Foundation - Expense System")
150-
Exit Sub
151-
End If
152150
'if they are not logged on... throw an error ... 4-22-2016
153151
If sHandle = "" Then
154152
MsgBox("Please create a user name first. After logging in you may re-submit the form.", MsgBoxStyle.Critical, "Not Logged In")
@@ -157,9 +155,25 @@ Public Class frmAddExpense
157155
Exit Sub
158156
End If
159157

160-
mGRCData.mInsertExpense(Mode, txtSubmittedBy.Text, txtTicketId.Text, "All", _
161-
sType, txtDescription.Text, sType, rtbNotes.Text, MerkleRoot, _
162-
Trim(dtStart.Text), Trim(dtEnd.Text), Trim(txtAmount.Text), rtbNotes.Text, txtAttachment.Text)
158+
Dim sAnswers As String = "Approve;Deny"
159+
160+
Try
161+
mGRCData.mInsertExpense(Mode, txtSubmittedBy.Text, txtTicketId.Text, "All", _
162+
sType, txtDescription.Text, sType, rtbNotes.Text, MerkleRoot, _
163+
Trim(dtStart.Text), Trim(dtEnd.Text), Trim(txtAmount.Text), rtbNotes.Text, txtAttachment.Text)
164+
165+
Catch ex As Exception
166+
MsgBox("An error occurred while inserting the new expense [" + ex.Message + "]", MsgBoxStyle.Critical, "Gridcoin Foundation - Expense System")
167+
Exit Sub
168+
End Try
169+
170+
171+
Dim sResult As String = ExecuteRPCCommand("addpoll", sTitle, "21", sQuestion, sAnswers, "3", "http://www.gridcoin.us")
172+
If Not LCase(sResult).Contains("success") Then
173+
MsgBox(sResult, MsgBoxStyle.Information, "Gridcoin Foundation - Expense System")
174+
Exit Sub
175+
End If
176+
163177

164178
SetViewMode()
165179

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define CLIENT_VERSION_MAJOR 3
1010
#define CLIENT_VERSION_MINOR 5
1111
#define CLIENT_VERSION_REVISION 7
12-
#define CLIENT_VERSION_BUILD 0
12+
#define CLIENT_VERSION_BUILD 1
1313

1414
// Converts the parameter X to a string after macro replacement on X has been performed.
1515
// Don't merge these into one macro!

src/main.cpp

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern std::string NodeAddress(CNode* pfrom);
3333
extern std::string ConvertBinToHex(std::string a);
3434
extern std::string ConvertHexToBin(std::string a);
3535
extern void AskForOutstandingBlocksForcefully();
36-
36+
extern bool WalletOutOfSync();
3737

3838
extern void CleanInboundConnections();
3939
extern void RecoverNode();
@@ -997,7 +997,7 @@ MiningCPID GetNextProject(bool bForce)
997997

998998
if (mvCPIDs.size() < 1)
999999
{
1000-
if (fDebug3 && LessVerbose(10)) printf("Gridcoin has no CPIDs...");
1000+
if (fDebug && LessVerbose(10)) printf("Gridcoin has no CPIDs...");
10011001
//Let control reach the investor area
10021002
}
10031003

@@ -4867,22 +4867,18 @@ void GridcoinServices()
48674867

48684868
if (TimerMain("OutOfSync",120))
48694869
{
4870-
double PORDiff = GetDifficulty(GetLastBlockIndex(pindexBest, true));
4871-
bool fGhostChain = (!fTestNet && PORDiff < .75);
4872-
if (OutOfSyncByMoreThan(30) || fGhostChain)
4870+
if (WalletOutOfSync())
48734871
{
48744872
RecoverNode();
48754873
}
48764874
}
48774875

48784876
if (TimerMain("OutOfSyncDaily",900))
48794877
{
4880-
double PORDiff = GetDifficulty(GetLastBlockIndex(pindexBest, true));
4881-
bool fGhostChain = (!fTestNet && PORDiff < .75);
4882-
if (OutOfSyncByMoreThan(30) || fGhostChain)
4878+
if (WalletOutOfSync())
48834879
{
48844880
printf("Restarting Gridcoin...");
4885-
#ifdef QT_GUI
4881+
#if defined(WIN32) && defined(QT_GUI)
48864882
int iResult = RestartClient();
48874883
#endif
48884884
}
@@ -4932,7 +4928,7 @@ void GridcoinServices()
49324928
printf (" MRSA %f, BH %f ",(double)superblock_age,(double)nBestHeight);
49334929
if (nBestHeight==nLastBestHeight)
49344930
{
4935-
printf("\r\n ************ Processing block with the same best height as the last best height... ************* %f\r\n",(double)nBestHeight);
4931+
//printf("\r\n ************ Processing block with the same best height as the last best height... ************* %f\r\n",(double)nBestHeight);
49364932
}
49374933
}
49384934

@@ -5130,10 +5126,7 @@ void RecoverNode()
51305126

51315127
void CheckForLatestBlocks()
51325128
{
5133-
bool fOut = OutOfSyncByMoreThan(30);
5134-
double PORDiff = GetDifficulty(GetLastBlockIndex(pindexBest, true));
5135-
bool fGhostChain = (!fTestNet && PORDiff < .75);
5136-
if (fOut || fGhostChain)
5129+
if (WalletOutOfSync())
51375130
{
51385131
mapOrphanBlocks.clear();
51395132
setStakeSeen.clear();
@@ -5204,6 +5197,17 @@ void ReloadBlockIndexHot()
52045197
printf("\r\n * Node Recovered * \r\n");
52055198
}
52065199

5200+
bool WalletOutOfSync()
5201+
{
5202+
// Only trigger an out of sync condition if the node has synced near the best block prior to going out of sync.
5203+
bool fOut = OutOfSyncByMoreThan(30);
5204+
double PORDiff = GetDifficulty(GetLastBlockIndex(pindexBest, true));
5205+
bool fGhostChain = (!fTestNet && PORDiff < .75);
5206+
int iPeerBlocks = GetNumBlocksOfPeers();
5207+
bool bSyncedCloseToTop = nBestHeight > iPeerBlocks-1000;
5208+
if ((fOut || fGhostChain) && bSyncedCloseToTop) return true;
5209+
return false;
5210+
}
52075211

52085212
bool ProcessBlock(CNode* pfrom, CBlock* pblock, bool generated_by_me)
52095213
{
@@ -5253,16 +5257,13 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock, bool generated_by_me)
52535257
// R HALFORD - 05-13-2016 - If we are out of sync, and get bombarded with orphans, recover the node.
52545258
if (TimerMain("OrphanBarrage", 40))
52555259
{
5256-
bool fOut = OutOfSyncByMoreThan(30);
5257-
double PORDiff = GetDifficulty(GetLastBlockIndex(pindexBest, true));
5258-
bool fGhostChain = (!fTestNet && PORDiff < .75);
5259-
if (fOut || fGhostChain)
5260+
if (WalletOutOfSync())
52605261
{
52615262
if (TimerMain("OrphansAndNotRecovering",8))
52625263
{
52635264
printf("\r\nGridcoin has not recovered after clearing orphans; Restarting node...\r\n");
5264-
#ifdef QT_GUI
5265-
int iResult = RestartClient();
5265+
#if defined(WIN32) && defined(QT_GUI)
5266+
int iResult = RestartClient();
52665267
#endif
52675268
}
52685269
else

src/qt/bitcoingui.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,14 @@ int RestartClient()
467467
{
468468
if (!bGlobalcomInitialized) return 0;
469469
QString sFilename = "GRCRestarter.exe";
470-
QString sArgument = "";
471-
QString path = QCoreApplication::applicationDirPath() + "\\" + sFilename;
472-
QProcess p;
470+
QString sArgument = "";
471+
QString path = QCoreApplication::applicationDirPath() + "\\" + sFilename;
472+
QProcess p;
473473
#ifdef WIN32
474474
globalcom->dynamicCall("RebootClient()");
475475
#endif
476-
StartShutdown();
477-
return 1;
476+
StartShutdown();
477+
return 1;
478478
}
479479

480480
void qtUpdateConfirm(std::string txid)

src/rpcblockchain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2112,7 +2112,7 @@ Value execute(const Array& params, bool fHelp)
21122112
{
21132113
printf("Restarting Gridcoin...");
21142114
int iResult = 0;
2115-
#ifdef QT_GUI
2115+
#if defined(WIN32) && defined(QT_GUI)
21162116
iResult = RestartClient();
21172117
#endif
21182118
entry.push_back(Pair("Restarting",(double)iResult));

0 commit comments

Comments
 (0)