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 127 Lines • ▼ Show 20 Lines | |||||
extern bool fTxIndex; | extern bool fTxIndex; | ||||
extern bool fIsBareMultisigStd; | extern bool fIsBareMultisigStd; | ||||
extern bool fRequireStandard; | extern bool fRequireStandard; | ||||
extern bool fCheckBlockIndex; | extern bool fCheckBlockIndex; | ||||
extern bool fCheckpointsEnabled; | extern bool fCheckpointsEnabled; | ||||
extern size_t nCoinCacheUsage; | extern size_t nCoinCacheUsage; | ||||
/** | /** | ||||
* Absolute maximum transaction fee (in satoshis) used by wallet and mempool | |||||
* (rejects high fee in sendrawtransaction) | |||||
*/ | |||||
extern Amount maxTxFee; | |||||
/** | |||||
* If the tip is older than this (in seconds), the node is considered to be in | * If the tip is older than this (in seconds), the node is considered to be in | ||||
* initial block download. | * initial block download. | ||||
*/ | */ | ||||
extern int64_t nMaxTipAge; | extern int64_t nMaxTipAge; | ||||
/** | /** | ||||
* Block hash whose ancestors we will assume to have valid scripts without | * Block hash whose ancestors we will assume to have valid scripts without | ||||
* checking them. | * checking them. | ||||
▲ Show 20 Lines • Show All 216 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 |