Check if the transaction is over standard P2WSH resources limit: 3600bytes witnessScript size, 80bytes per witness stack element, 100 witness stack elements These limits are adequate for multisignatures up to n‐of‐100 using OP_CHECKSIG, OP_ADD, and OP_EQUAL.

Synopsis

Declared in <policy/policy.h>

bool
IsWitnessStandard(
    CTransaction const& tx,
    CCoinsViewCache const& mapInputs);

Description

Also enforce a maximum stack item size limit and no annexes for tapscript spends.

Return Value

True if every witness stays within standard resource limits.

Parameters

Name

Description

tx

Transaction whose witness data is checked.

mapInputs

View providing the outputs spent by the transaction.

Created with MrDocs