mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 15:39:05 +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:
13
src/main.h
13
src/main.h
@@ -54,7 +54,6 @@ static const int fHaveUPnP = false;
|
||||
extern CCriticalSection cs_main;
|
||||
extern std::map<uint256, CBlockIndex*> mapBlockIndex;
|
||||
extern uint256 hashGenesisBlock;
|
||||
extern CBigNum bnProofOfWorkLimit;
|
||||
extern CBlockIndex* pindexGenesisBlock;
|
||||
extern int nBestHeight;
|
||||
extern CBigNum bnBestChainWork;
|
||||
@@ -1558,16 +1557,4 @@ public:
|
||||
bool ProcessAlert();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern std::map<uint256, CTransaction> mapTransactions;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user