Don't use global (external) symbols for symbols that are used in only one translation unit

This commit is contained in:
practicalswift
2019-05-26 11:01:58 +02:00
parent 03858b23fe
commit 0959d37e3e
4 changed files with 10 additions and 7 deletions

View File

@@ -78,7 +78,7 @@ bool CBlockIndexWorkComparator::operator()(const CBlockIndex *pa, const CBlockIn
return false;
}
CChainState g_chainstate;
static CChainState g_chainstate;
CChainState& ChainstateActive() { return g_chainstate; }
@@ -1049,7 +1049,7 @@ bool CChainState::IsInitialBlockDownload() const
return false;
}
CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr;
static CBlockIndex *pindexBestForkTip = nullptr, *pindexBestForkBase = nullptr;
static void AlertNotify(const std::string& strMessage)
{
@@ -4762,4 +4762,5 @@ public:
delete (*it1).second;
mapBlockIndex.clear();
}
} instance_of_cmaincleanup;
};
static CMainCleanup instance_of_cmaincleanup;