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:
10
src/net.cpp
10
src/net.cpp
@@ -83,10 +83,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;
|
||||
@@ -95,7 +95,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;
|
||||
@@ -1806,7 +1806,7 @@ bool StopNode()
|
||||
return true;
|
||||
}
|
||||
|
||||
class CNetCleanup
|
||||
static class CNetCleanup
|
||||
{
|
||||
public:
|
||||
CNetCleanup() {}
|
||||
|
||||
Reference in New Issue
Block a user