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:
Giel van Schijndel
2011-08-11 13:41:01 +02:00
parent 865ed8a1e5
commit 99860de3c9
4 changed files with 4 additions and 19 deletions

View File

@@ -476,10 +476,8 @@ extern bool fClient;
extern bool fAllowDNS;
extern uint64 nLocalServices;
extern CAddress addrLocalHost;
extern CNode* pnodeLocalHost;
extern uint64 nLocalHostNonce;
extern boost::array<int, 10> vnThreadsRunning;
extern SOCKET hListenSocket;
extern std::vector<CNode*> vNodes;
extern CCriticalSection cs_vNodes;