pub fn are_inputs_standard(
    tx: &Transaction,
    map_inputs: &CoinsViewCache,
    taproot_active: bool
) -> bool
Expand description

| Check for standard transaction types | | ———– | @param[in] mapInputs | | Map of previous transactions that have | outputs we’re spending | ––––– | @param[in] taproot_active | | Whether or taproot consensus rules | are active (used to decide whether spends | of them are permitted) | | ———– | @return | | True if all inputs (scriptSigs) use | only standard transaction forms | | ———– | Check transaction inputs to mitigate two | potential denial-of-service attacks: | | 1. scriptSigs with extra data stuffed into them, | not consumed by scriptPubKey (or P2SH script) | | 2. P2SH scripts with a crazy number of expensive | CHECKSIG/CHECKMULTISIG operations | | Why bother? To avoid denial-of-service attacks; | an attacker can submit a standard | HASH… OP_EQUAL transaction, which will get | accepted into blocks. | | | The redemption script can be anything; an | attacker could use a very | expensive-to-check-upon-redemption script like: | | DUP CHECKSIG DROP … repeated 100 times… OP_1 | | Note that only the non-witness portion of the | transaction is checked here.