Rename extern/global variables to g_varName instead of varName to avoid shadowing
This commit is contained in:
+12
-12
@@ -8,22 +8,22 @@
|
||||
#include <block/chain.h>
|
||||
#include <pthread.h>
|
||||
|
||||
extern uint64_t currentBlockHeight;
|
||||
extern blockchain_t* currentChain;
|
||||
extern uint256_t currentSupply;
|
||||
extern uint64_t currentReward;
|
||||
extern uint32_t difficultyTarget;
|
||||
extern const char* chainDataDir;
|
||||
extern unsigned short listenPort;
|
||||
extern bool echoPeersEnabled;
|
||||
extern bool forceOrphanReorgEnabled;
|
||||
extern uint64_t g_currentBlockHeight;
|
||||
extern blockchain_t* g_currentChain;
|
||||
extern uint256_t g_currentSupply;
|
||||
extern uint64_t g_currentReward;
|
||||
extern uint32_t g_difficultyTarget;
|
||||
extern const char* g_chainDataDir;
|
||||
extern unsigned short g_listenPort;
|
||||
extern bool g_echoPeersEnabled;
|
||||
extern bool g_forceOrphanReorgEnabled;
|
||||
// Random per-run identity of this node, advertised in HELLO/ACK_HELLO. A host can be reachable
|
||||
// under many addresses (especially over IPv6), so an (ip, port) endpoint is not a peer identity:
|
||||
// this nonce is what lets us recognise our own connections and a peer we already talk to.
|
||||
extern uint64_t localNodeId;
|
||||
extern uint64_t g_localNodeId;
|
||||
|
||||
// Global synchronization primitives for runtime state
|
||||
extern pthread_rwlock_t chainLock; // protects chain structure and related mutations
|
||||
extern pthread_mutex_t balanceSheetLock; // protects balance sheet map
|
||||
extern pthread_rwlock_t g_chainLock; // protects chain structure and related mutations
|
||||
extern pthread_mutex_t g_balanceSheetLock; // protects balance sheet map
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user