5 #ifndef BITCOIN_POLICY_PACKAGES_H 6 #define BITCOIN_POLICY_PACKAGES_H 23 static_assert(MAX_PACKAGE_WEIGHT >= MAX_STANDARD_TX_WEIGHT); 25 // If a package is to be evaluated, it must be at least as large as the mempool's ancestor/descendant limits,
48 using Package = std::vector<CTransactionRef>;
70 #endif // BITCOIN_POLICY_PACKAGES_H static const int WITNESS_SCALE_FACTOR
bool CheckPackage(const Package &txns, PackageValidationState &state)
Context-free package policy checks:
static constexpr unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT_KVB
Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants.
The package itself is invalid (e.g. too many transactions).
Template for capturing information about block/transaction validation.
std::vector< CTransactionRef > Package
A package is an ordered list of transactions.
bool IsChildWithParentsTree(const Package &package)
Context-free check that a package IsChildWithParents() and none of the parents depend on each other (...
static constexpr unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT_KVB
Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors.
static constexpr unsigned int DEFAULT_DESCENDANT_LIMIT
Default for -limitdescendantcount, max number of in-mempool descendants.
static constexpr unsigned int DEFAULT_ANCESTOR_LIMIT
Default for -limitancestorcount, max number of in-mempool ancestors.
PackageValidationResult
A "reason" why a package was invalid.
At least one tx is invalid.
static constexpr uint32_t MAX_PACKAGE_COUNT
Default maximum number of transactions in a package.
Initial value. The package has not yet been rejected.
bool IsChildWithParents(const Package &package)
Context-free check that a package is exactly one child and its parents; not all parents need to be pr...
static constexpr uint32_t MAX_PACKAGE_WEIGHT
Default maximum total weight of transactions in a package in weight to allow for context-less checks...