PreCheckEphemeralTx

Called for each transaction once transaction fees are known. Does context-less checks about a single transaction.

Synopsis

Declared in <policy/ephemeral_policy.h>

bool
PreCheckEphemeralTx(
    CTransaction const& tx,
    CFeeRate dust_relay_rate,
    CAmount base_fee,
    CAmount mod_fee,
    TxValidationState& state);

Return Value

false if the fee is non-zero and dust exists, populating state. True otherwise.

Parameters

NameDescription
txTransaction being checked for ephemeral-dust compliance.
dust_relay_rateFee rate used to decide which outputs count as dust.
base_feeUnmodified fee the transaction pays.
mod_feeFee after any priority modifications applied by the mempool.
stateSet with the rejection reason when the check fails.