diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2013-10-14 02:13:44 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2013-11-01 00:54:28 +0100 |
commit | caca6aa4eb54b71b5e4e9ccfa69341f985b178d9 (patch) | |
tree | e2fea18cde3f4459d25e0523116907286ea11235 /src/main.h | |
parent | 85eb2cef33fcf3e5c785d54b172eb3e8f932e3cb (diff) |
Make some globals in main non-public.
This means they are declared static, and their extern definition in
main.h is removed. Also moved CBlockIndexWorkComparator to the .cpp
file.
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/main.h b/src/main.h index 77e4792691..d568d8e6b8 100644 --- a/src/main.h +++ b/src/main.h @@ -26,8 +26,6 @@ class CAddress; class CInv; class CNode; -struct CBlockIndexWorkComparator; - /** The maximum allowed size for a serialized block, in bytes (network rule) */ static const unsigned int MAX_BLOCK_SIZE = 1000000; /** The maximum size for mined blocks */ @@ -73,7 +71,6 @@ extern CScript COINBASE_FLAGS; extern CCriticalSection cs_main; extern std::map<uint256, CBlockIndex*> mapBlockIndex; -extern std::set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid; extern unsigned int nTransactionsUpdated; extern uint64 nLastBlockTx; extern uint64 nLastBlockSize; @@ -646,10 +643,6 @@ public: } }; -extern CCriticalSection cs_LastBlockFile; -extern CBlockFileInfo infoLastBlockFile; -extern int nLastBlockFile; - enum BlockStatus { BLOCK_VALID_UNKNOWN = 0, BLOCK_VALID_HEADER = 1, // parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future @@ -849,19 +842,6 @@ public: } }; -struct CBlockIndexWorkComparator -{ - bool operator()(CBlockIndex *pa, CBlockIndex *pb) { - if (pa->nChainWork > pb->nChainWork) return false; - if (pa->nChainWork < pb->nChainWork) return true; - - if (pa->GetBlockHash() < pb->GetBlockHash()) return false; - if (pa->GetBlockHash() > pb->GetBlockHash()) return true; - - return false; // identical blocks - } -}; - /** Used to marshal pointers into hashes for db storage. */ |