IsWellFormedPackage

Context-free package policy checks: 1. The number of transactions cannot exceed MAX_PACKAGE_COUNT. 2. The total weight cannot exceed MAX_PACKAGE_WEIGHT. 3. If any dependencies exist between transactions, parents must appear before children. 4. Transactions cannot conflict, i.e., spend the same inputs.

Synopsis

Declared in <policy/packages.h>

bool
IsWellFormedPackage(
    Package const& txns,
    PackageValidationState& state);

Return Value

true if the package satisfies all context-free policy checks.

Parameters

NameDescription
txnsTransactions making up the package.
stateSet with the rejection reason when the package is not well formed.