Auto merge of #2894 - per-gron:dont-export-unless-needed, r=str4d
Make some globals static that can be I wrote this patch as part of making a Bazel build system but it really is independent from that so I'm putting this as a separate PR. External linkage does not help and just encourages sloppy dependencies (ie using symbols only declared in a cpp file in some other cpp file) and can lead to weird issues when there are name collisions.
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -55,7 +55,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;
|
||||
@@ -1644,9 +1644,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()
|
||||
{
|
||||
@@ -6052,7 +6053,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
|
||||
|
||||
|
||||
|
||||
class CMainCleanup
|
||||
static class CMainCleanup
|
||||
{
|
||||
public:
|
||||
CMainCleanup() {}
|
||||
|
||||
Reference in New Issue
Block a user