Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
/** Default for -minrelaytxfee, minimum relay fee for transactions */ | /** Default for -minrelaytxfee, minimum relay fee for transactions */ | ||||
static const Amount DEFAULT_MIN_RELAY_TX_FEE_PER_KB(1000 * SATOSHI); | static const Amount DEFAULT_MIN_RELAY_TX_FEE_PER_KB(1000 * SATOSHI); | ||||
/** Default for -excessutxocharge for transactions transactions */ | /** Default for -excessutxocharge for transactions transactions */ | ||||
static const Amount DEFAULT_UTXO_FEE = Amount::zero(); | static const Amount DEFAULT_UTXO_FEE = Amount::zero(); | ||||
//! -maxtxfee default | //! -maxtxfee default | ||||
static const Amount DEFAULT_TRANSACTION_MAXFEE(COIN / 10); | static const Amount DEFAULT_TRANSACTION_MAXFEE(COIN / 10); | ||||
//! Discourage users to set fees higher than this amount (in satoshis) per kB | //! Discourage users to set fees higher than this amount (in satoshis) per kB | ||||
static const Amount HIGH_TX_FEE_PER_KB(COIN / 100); | static const Amount HIGH_TX_FEE_PER_KB(COIN / 100); | ||||
/** -maxtxfee will warn if called with a higher fee than this amount (in | /** | ||||
* satoshis */ | * -maxtxfee will warn if called with a higher fee than this amount (in satoshis | ||||
*/ | |||||
static const Amount HIGH_MAX_TX_FEE(100 * HIGH_TX_FEE_PER_KB); | static const Amount HIGH_MAX_TX_FEE(100 * HIGH_TX_FEE_PER_KB); | ||||
/** Default for -limitancestorcount, max number of in-mempool ancestors */ | /** Default for -limitancestorcount, max number of in-mempool ancestors */ | ||||
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25; | static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25; | ||||
/** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool | /** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool | ||||
* ancestors */ | * ancestors */ | ||||
static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101; | static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101; | ||||
/** Default for -limitdescendantcount, max number of in-mempool descendants */ | /** Default for -limitdescendantcount, max number of in-mempool descendants */ | ||||
static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25; | static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25; | ||||
Show All 9 Lines | |||||
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB | static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB | ||||
/** The pre-allocation chunk size for rev?????.dat files (since 0.8) */ | /** The pre-allocation chunk size for rev?????.dat files (since 0.8) */ | ||||
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB | static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB | ||||
/** Maximum number of script-checking threads allowed */ | /** Maximum number of script-checking threads allowed */ | ||||
static const int MAX_SCRIPTCHECK_THREADS = 16; | static const int MAX_SCRIPTCHECK_THREADS = 16; | ||||
/** -par default (number of script-checking threads, 0 = auto) */ | /** -par default (number of script-checking threads, 0 = auto) */ | ||||
static const int DEFAULT_SCRIPTCHECK_THREADS = 0; | static const int DEFAULT_SCRIPTCHECK_THREADS = 0; | ||||
/** Number of blocks that can be requested at any given time from a single peer. | /** | ||||
* Number of blocks that can be requested at any given time from a single peer. | |||||
*/ | */ | ||||
static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16; | static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16; | ||||
/** | /** | ||||
* Timeout in seconds during which a peer must stall block download progress | * Timeout in seconds during which a peer must stall block download progress | ||||
* before being disconnected. | * before being disconnected. | ||||
*/ | */ | ||||
static const unsigned int BLOCK_STALLING_TIMEOUT = 2; | static const unsigned int BLOCK_STALLING_TIMEOUT = 2; | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
/** 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; | ||||
/** Default for -stopatheight */ | /** Default for -stopatheight */ | ||||
static const int DEFAULT_STOPATHEIGHT = 0; | static const int DEFAULT_STOPATHEIGHT = 0; | ||||
/** Default for -maxreorgdepth */ | |||||
static const int DEFAULT_MAX_REORG_DEPTH = 10; | |||||
extern CScript COINBASE_FLAGS; | extern CScript COINBASE_FLAGS; | ||||
extern CCriticalSection cs_main; | extern CCriticalSection cs_main; | ||||
extern CTxMemPool mempool; | extern CTxMemPool mempool; | ||||
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 g_best_block_mutex; | extern CWaitableCriticalSection g_best_block_mutex; | ||||
▲ Show 20 Lines • Show All 422 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
bool PreciousBlock(const Config &config, CValidationState &state, | bool PreciousBlock(const Config &config, CValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
/** | /** | ||||
* Mark a block as finalized. | * Mark a block as finalized. | ||||
* A finalized block can not be reorged in any way. | * A finalized block can not be reorged in any way. | ||||
*/ | */ | ||||
bool FinalizeBlock(const Config &config, CValidationState &state, | bool FinalizeBlockAndInvalidate(const Config &config, CValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
/** Mark a block as invalid. */ | /** Mark a block as invalid. */ | ||||
bool InvalidateBlock(const Config &config, CValidationState &state, | bool InvalidateBlock(const Config &config, CValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
/** Park a block. */ | /** Park a block. */ | ||||
bool ParkBlock(const Config &config, CValidationState &state, | bool ParkBlock(const Config &config, CValidationState &state, | ||||
CBlockIndex *pindex); | CBlockIndex *pindex); | ||||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |