mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Make some global variables less-global (static)
Explicitly make these global variables less-global to reduce the maximum scope of this global state. In my experience global variables tend to be a major source of bugs. As such the less accessible they are the less likely they are to be the source of a bug. Signed-off-by: Giel van Schijndel <me@mortis.eu>
This commit is contained in:
@@ -50,10 +50,10 @@ bool fClient = false;
|
||||
bool fAllowDNS = false;
|
||||
uint64 nLocalServices = (fClient ? 0 : NODE_NETWORK);
|
||||
CAddress addrLocalHost("0.0.0.0", 0, false, nLocalServices);
|
||||
CNode* pnodeLocalHost = NULL;
|
||||
static CNode* pnodeLocalHost = NULL;
|
||||
uint64 nLocalHostNonce = 0;
|
||||
array<int, 10> vnThreadsRunning;
|
||||
SOCKET hListenSocket = INVALID_SOCKET;
|
||||
static SOCKET hListenSocket = INVALID_SOCKET;
|
||||
|
||||
vector<CNode*> vNodes;
|
||||
CCriticalSection cs_vNodes;
|
||||
|
||||
Reference in New Issue
Block a user