Merge bitcoin/bitcoin#35328: test: restore assertion that tx contains exactly 2500 sigops

ae73b69b52 test: restore assertion that tx contains exactly 2500 sigops (ismaelsadeeq)

Pull request description:

  darosior wrote https://github.com/bitcoin/bitcoin/pull/29060#discussion_r3267762329:

  _This is useful documentation, plus useful in making sure the comment above the check does not become stale or incorrect._

  Hence reverted.

ACKs for top commit:
  l0rinc:
    code review ACK ae73b69b52
  sedited:
    ACK ae73b69b52
  willcl-ark:
    ACK ae73b69b52

Tree-SHA512: 2c76e9b66e367613c1232b65b1c18f2d0c1068acdf712ca0937dae465e637b024df95d6479f26cc5d04e5767e711eb5b3f3a329207af75ee64c7bfc8bc9173f6
This commit is contained in:
merge-script
2026-05-20 13:17:41 +01:00

View File

@@ -1089,6 +1089,7 @@ BOOST_AUTO_TEST_CASE(max_standard_legacy_sigops)
AddCoins(coins, CTransaction(tx_create_p2pk), 0, false);
// The transaction now contains exactly 2500 sigops, the check should pass.
BOOST_CHECK_EQUAL(p2sh_inputs_count * MAX_P2SH_SIGOPS + p2pk_inputs_count * 1, MAX_TX_LEGACY_SIGOPS);
BOOST_CHECK(::ValidateInputsStandardness(CTransaction(tx_max_sigops), coins).IsValid());
// Now, add some Segwit inputs. We add one for each defined Segwit output type. The limit