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

@@ -81,10 +81,10 @@ CCriticalSection cs_mapRelay;
limitedmap<CInv, int64_t> mapAlreadyAskedFor(MAX_INV_SZ);
static deque<string> vOneShots;
CCriticalSection cs_vOneShots;
static CCriticalSection cs_vOneShots;
set<CNetAddr> setservAddNodeAddresses;
CCriticalSection cs_setservAddNodeAddresses;
static set<CNetAddr> setservAddNodeAddresses;
static CCriticalSection cs_setservAddNodeAddresses;
vector<std::string> vAddedNodes;
CCriticalSection cs_vAddedNodes;
@@ -93,7 +93,7 @@ NodeId nLastNodeId = 0;
CCriticalSection cs_nLastNodeId;
static CSemaphore *semOutbound = NULL;
boost::condition_variable messageHandlerCondition;
static boost::condition_variable messageHandlerCondition;
// Signals for message handling
static CNodeSignals g_signals;
@@ -1779,7 +1779,7 @@ bool StopNode()
return true;
}
class CNetCleanup
static class CNetCleanup
{
public:
CNetCleanup() {}