Skip to content

Commit

Permalink
Merge branch 'hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
denravonska committed Jan 24, 2018
2 parents 4d294da + 5ea8e0b commit 8a6432e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ bool bForceUpdate = false;
bool bGlobalcomInitialized = false;
bool bStakeMinerOutOfSyncWithNetwork = false;
volatile bool bDoTally_retired = false;
volatile bool bTallyFinished_retired = false;
volatile bool bTallyFinished_retired = true;
bool bGridcoinGUILoaded = false;

extern double LederstrumpfMagnitude2(double Magnitude, int64_t locktime);
Expand Down Expand Up @@ -4264,6 +4264,15 @@ void GridcoinServices()
// Tally research averages.
if ((nBestHeight % TALLY_GRANULARITY) == 0)
{
// Wait for previous retired tally to finish if running.
// This can happen when syncing the chain.
if(!bTallyFinished_retired)
{
printf("SVC: Wait for retired tally to finish\n");
while(!bTallyFinished_retired)
MilliSleep(10);
}

if (fDebug) printf("SVC: TallyNetworkAverages (v9 %%%d) height %d\n",TALLY_GRANULARITY,nBestHeight);
TallyNetworkAverages_v9();
}
Expand Down

0 comments on commit 8a6432e

Please sign in to comment.