Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show All 14 Lines | |||||
#include "chain.h" | #include "chain.h" | ||||
#include "coins.h" | #include "coins.h" | ||||
#include "protocol.h" // For CMessageHeader::MessageMagic | #include "protocol.h" // For CMessageHeader::MessageMagic | ||||
#include "script/script_error.h" | #include "script/script_error.h" | ||||
#include "sync.h" | #include "sync.h" | ||||
#include "versionbits.h" | #include "versionbits.h" | ||||
#include <algorithm> | #include <algorithm> | ||||
#include <atomic> | |||||
#include <cstdint> | #include <cstdint> | ||||
#include <exception> | #include <exception> | ||||
#include <map> | #include <map> | ||||
#include <set> | #include <set> | ||||
#include <string> | #include <string> | ||||
#include <utility> | #include <utility> | ||||
#include <vector> | #include <vector> | ||||
#include <atomic> | |||||
#include <boost/filesystem/path.hpp> | #include <boost/filesystem/path.hpp> | ||||
#include <unordered_map> | |||||
class CBlockIndex; | class CBlockIndex; | ||||
class CBlockTreeDB; | class CBlockTreeDB; | ||||
class CBloomFilter; | class CBloomFilter; | ||||
class CChainParams; | class CChainParams; | ||||
class CConnman; | class CConnman; | ||||
class CInv; | class CInv; | ||||
class Config; | class Config; | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | |||||
* message.*/ | * message.*/ | ||||
static const unsigned int MAX_BLOCKS_TO_ANNOUNCE = 8; | static const unsigned int MAX_BLOCKS_TO_ANNOUNCE = 8; | ||||
/** Maximum number of unconnecting headers announcements before DoS score */ | /** Maximum number of unconnecting headers announcements before DoS score */ | ||||
static const int MAX_UNCONNECTING_HEADERS = 10; | static const int MAX_UNCONNECTING_HEADERS = 10; | ||||
static const bool DEFAULT_PEERBLOOMFILTERS = true; | static const bool DEFAULT_PEERBLOOMFILTERS = true; | ||||
struct BlockHasher { | |||||
size_t operator()(const uint256 &hash) const { return hash.GetCheapHash(); } | |||||
}; | |||||
extern CScript COINBASE_FLAGS; | extern CScript COINBASE_FLAGS; | ||||
extern CCriticalSection cs_main; | extern CCriticalSection cs_main; | ||||
extern CTxMemPool mempool; | extern CTxMemPool mempool; | ||||
typedef std::unordered_map<uint256, CBlockIndex *, BlockHasher> BlockMap; | |||||
extern BlockMap mapBlockIndex; | |||||
extern uint64_t nLastBlockTx; | extern uint64_t nLastBlockTx; | ||||
extern uint64_t nLastBlockSize; | extern uint64_t nLastBlockSize; | ||||
extern const std::string strMessageMagic; | extern const std::string strMessageMagic; | ||||
extern CWaitableCriticalSection csBestBlock; | extern CWaitableCriticalSection csBestBlock; | ||||
extern CConditionVariable cvBlockChange; | extern CConditionVariable cvBlockChange; | ||||
extern std::atomic_bool fImporting; | extern std::atomic_bool fImporting; | ||||
extern bool fReindex; | extern bool fReindex; | ||||
extern int nScriptCheckThreads; | extern int nScriptCheckThreads; | ||||
▲ Show 20 Lines • Show All 500 Lines • Show Last 20 Lines |