mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
doc: Update comments for AreInputsStandard to match code
This commit is contained in:
parent
770d39a376
commit
52ede28a8a
1 changed files with 11 additions and 13 deletions
|
@ -169,20 +169,18 @@ bool IsStandardTx(const CTransaction& tx, const std::optional<unsigned>& max_dat
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check transaction inputs to mitigate two
|
* Check transaction inputs.
|
||||||
* potential denial-of-service attacks:
|
|
||||||
*
|
*
|
||||||
* 1. scriptSigs with extra data stuffed into them,
|
* This does three things:
|
||||||
* not consumed by scriptPubKey (or P2SH script)
|
* * Prevents mempool acceptance of spends of future
|
||||||
* 2. P2SH scripts with a crazy number of expensive
|
* segwit versions we don't know how to validate
|
||||||
* CHECKSIG/CHECKMULTISIG operations
|
* * Mitigates a potential denial-of-service attack with
|
||||||
*
|
* P2SH scripts with a crazy number of expensive
|
||||||
* Why bother? To avoid denial-of-service attacks; an attacker
|
* CHECKSIG/CHECKMULTISIG operations.
|
||||||
* can submit a standard HASH... OP_EQUAL transaction,
|
* * Prevents spends of unknown/irregular scriptPubKeys,
|
||||||
* which will get accepted into blocks. The redemption
|
* which mitigates potential denial-of-service attacks
|
||||||
* script can be anything; an attacker could use a very
|
* involving expensive scripts and helps reserve them
|
||||||
* expensive-to-check-upon-redemption script like:
|
* as potential new upgrade hooks.
|
||||||
* DUP CHECKSIG DROP ... repeated 100 times... OP_1
|
|
||||||
*
|
*
|
||||||
* Note that only the non-witness portion of the transaction is checked here.
|
* Note that only the non-witness portion of the transaction is checked here.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue