Changeset View
Changeset View
Standalone View
Standalone View
src/validation.h
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
static const bool DEFAULT_WHITELISTRELAY = true; | static const bool DEFAULT_WHITELISTRELAY = true; | ||||
/** Default for DEFAULT_WHITELISTFORCERELAY. */ | /** Default for DEFAULT_WHITELISTFORCERELAY. */ | ||||
static const bool DEFAULT_WHITELISTFORCERELAY = true; | static const bool DEFAULT_WHITELISTFORCERELAY = true; | ||||
/** 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_PER_KB = | ||||
10000 * DEFAULT_MIN_RELAY_TX_FEE_PER_KB; | |||||
//! 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 | /** -maxtxfee will warn if called with a higher fee than this amount (in | ||||
* satoshis */ | * satoshis */ | ||||
static const Amount HIGH_MAX_TX_FEE(100 * HIGH_TX_FEE_PER_KB); | static const Amount HIGH_MAX_TX_FEE(10 * DEFAULT_TRANSACTION_MAXFEE_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; | ||||
/** Default for -limitdescendantsize, maximum kilobytes of in-mempool | /** Default for -limitdescendantsize, maximum kilobytes of in-mempool | ||||
▲ Show 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* (try to) add transaction to memory pool | * (try to) add transaction to memory pool | ||||
*/ | */ | ||||
bool AcceptToMemoryPool(const Config &config, CTxMemPool &pool, | bool AcceptToMemoryPool(const Config &config, CTxMemPool &pool, | ||||
CValidationState &state, const CTransactionRef &tx, | CValidationState &state, const CTransactionRef &tx, | ||||
bool fLimitFree, bool *pfMissingInputs, | bool fLimitFree, bool *pfMissingInputs, | ||||
bool fOverrideMempoolLimit = false, | bool fOverrideMempoolLimit = false, | ||||
const Amount nAbsurdFee = Amount::zero()); | const CFeeRate nAbsurdFee = CFeeRate(Amount::zero())); | ||||
/** Convert CValidationState to a human-readable message for logging */ | /** Convert CValidationState to a human-readable message for logging */ | ||||
std::string FormatStateMessage(const CValidationState &state); | std::string FormatStateMessage(const CValidationState &state); | ||||
/** | /** | ||||
* Check whether all inputs of this transaction are valid (no double spends, | * Check whether all inputs of this transaction are valid (no double spends, | ||||
* scripts & sigs, amounts). This does not modify the UTXO set. | * scripts & sigs, amounts). This does not modify the UTXO set. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 238 Lines • Show Last 20 Lines |