Make some globals static that can be

External linkage does not help and just encourages sloppy dependencies
and can lead to weird issues when there are name collisions.
This commit is contained in:
Per Grön
2018-01-14 17:23:05 +01:00
parent 38246ea461
commit 39d2e9e0cb
9 changed files with 36 additions and 34 deletions

View File

@@ -54,7 +54,7 @@ CCriticalSection cs_main;
BlockMap mapBlockIndex;
CChain chainActive;
CBlockIndex *pindexBestHeader = NULL;
int64_t nTimeBestReceived = 0;
static int64_t nTimeBestReceived = 0;
CWaitableCriticalSection csBestBlock;
CConditionVariable cvBlockChange;
int nScriptCheckThreads = 0;
@@ -1436,9 +1436,10 @@ bool IsInitialBlockDownload()
return state;
}
bool fLargeWorkForkFound = false;
bool fLargeWorkInvalidChainFound = false;
CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL;
static bool fLargeWorkForkFound = false;
static bool fLargeWorkInvalidChainFound = false;
static CBlockIndex *pindexBestForkTip = NULL;
static CBlockIndex *pindexBestForkBase = NULL;
void CheckForkWarningConditions()
{
@@ -5578,7 +5579,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
class CMainCleanup
static class CMainCleanup
{
public:
CMainCleanup() {}