![]() |
Bitcoin Core 22.99.0
P2P Digital Currency
|
#include <consensus/validation.h>
#include <policy/policy.h>
#include <primitives/transaction.h>
#include <vector>
Go to the source code of this file.
Classes | |
class | PackageValidationState |
Typedefs | |
using | Package = std::vector< CTransactionRef > |
A package is an ordered list of transactions. More... | |
Enumerations | |
enum class | PackageValidationResult { PCKG_RESULT_UNSET = 0 , PCKG_POLICY , PCKG_TX } |
A "reason" why a package was invalid. More... | |
Functions | |
bool | CheckPackage (const Package &txns, PackageValidationState &state) |
Context-free package policy checks: More... | |
Variables | |
static constexpr uint32_t | MAX_PACKAGE_COUNT {25} |
Default maximum number of transactions in a package. More... | |
static constexpr uint32_t | MAX_PACKAGE_SIZE {101} |
Default maximum total virtual size of transactions in a package in KvB. More... | |
using Package = std::vector<CTransactionRef> |
A package is an ordered list of transactions.
The transactions cannot conflict with (spend the same inputs as) one another.
Definition at line 32 of file packages.h.
|
strong |
A "reason" why a package was invalid.
It may be that one or more of the included transactions is invalid or the package itself violates our rules. We don't distinguish between consensus and policy violations right now.
Enumerator | |
---|---|
PCKG_RESULT_UNSET | Initial value. The package has not yet been rejected. |
PCKG_POLICY | The package itself is invalid (e.g. too many transactions). |
PCKG_TX | At least one tx is invalid. |
Definition at line 24 of file packages.h.
bool CheckPackage | ( | const Package & | txns, |
PackageValidationState & | state | ||
) |
Context-free package policy checks:
Definition at line 14 of file packages.cpp.
|
staticconstexpr |
Default maximum number of transactions in a package.
Definition at line 15 of file packages.h.
|
staticconstexpr |
Default maximum total virtual size of transactions in a package in KvB.
Definition at line 17 of file packages.h.