Files
bitcoin/src
merge-script b1f8a13702 Merge bitcoin/bitcoin#33624: test: P2SH sig ops are only counted with SCRIPT_VERIFY_P2SH
3a10d700bc test: P2SH sig ops are only counted with `SCRIPT_VERIFY_P2SH` flag (brunoerg)

Pull request description:

  This PR adds a test case for `GetTransactionSigOpCost` to check that P2SH sig ops are only counted when `SCRIPT_VERIFY_P2SH` flag is set.

  Kills the following [mutant](https://corecheck.dev/mutation/src/consensus/tx_verify.cpp#L150):

  ```diff
  diff --git a/src/consensus/tx_verify.cpp b/src/consensus/tx_verify.cpp
  index 9d09872597..cc7cdaaf8f 100644
  --- a/src/consensus/tx_verify.cpp
  +++ b/src/consensus/tx_verify.cpp
  @@ -147,7 +147,7 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i
       if (tx.IsCoinBase())
           return nSigOps;

  -    if (flags & SCRIPT_VERIFY_P2SH) {
  +    if (1==1) {
           nSigOps += GetP2SHSigOpCount(tx, inputs) * WITNESS_SCALE_FACTOR;
       }
  ```

ACKs for top commit:
  l0rinc:
    Tested ACK 3a10d700bc
  maflcko:
    re-lgtm ACK 3a10d700bc
  instagibbs:
    ACK 3a10d700bc
  janb84:
    tested ACK 3a10d700bc

Tree-SHA512: f560b4f9f2ce5c5fdd0a86e7e1f8ea27a8c6fda0327a6186a0c21e2c06ef13beeb017686db1688cace68812a01701abe46e8e1a095afefc6f2aed6ed96ba8288
2025-10-15 09:55:49 +01:00
..
2025-09-08 18:39:55 +01:00
2025-09-07 17:28:31 +02:00
2025-05-19 16:40:33 +01:00
2025-09-03 11:23:30 +01:00
2025-05-20 09:30:41 +01:00
2024-11-26 20:47:08 -05:00
2025-05-19 16:40:33 +01:00
2025-09-30 11:06:43 -07:00
2025-08-12 11:28:36 -04:00
2025-08-12 11:28:36 -04:00
2025-09-30 11:06:43 -07:00
2024-05-20 16:48:19 +00:00
2024-07-08 11:12:01 +02:00
2025-06-03 08:09:21 +01:00
2025-09-30 11:06:43 -07:00
2025-05-08 16:49:58 +01:00
2025-04-09 15:59:59 +01:00
2025-04-09 15:59:59 +01:00