IsStandardTx

Check for standard transaction types

Synopsis

Declared in <policy/policy.h>

bool
IsStandardTx(
    CTransaction const& tx,
    std::optional<unsigned int> const& max_datacarrier_bytes,
    bool permit_bare_multisig,
    CFeeRate const& dust_relay_fee,
    std::string& reason);

Return Value

True if all outputs (scriptPubKeys) use only standard transaction forms

Parameters

NameDescription
txTransaction to check.
max_datacarrier_bytesMaximum allowed size of OP_RETURN data, if any.
permit_bare_multisigWhether bare multisig outputs are treated as standard.
dust_relay_feeFee rate used to define dust.
reasonSet to a description of the first non-standard feature found.