Merge bitcoin/bitcoin#32143: Fix 11-year-old mis-categorized error code in OP_IF evaluation

a7b581423e Fix 11-year-old mis-categorized error code in OP_IF evaluation (Calin Culianu)

Pull request description:

  This was introduced by commit ab9edbd6b6.

  It appears the original author may have gotten tired and pasted the wrong error code into this 1 place. Every other situation where the value stack lacks the required number of arguments for the op-code, SCRIPT_ERR_INVALID_STACK_OPERATION is reported. Not so here.

  This commit fixes the situation.

  EDIT: Note this turns out to be a dupe of the abandoned #30359 .

ACKs for top commit:
  billymcbip:
    tACK a7b581423e
  achow101:
    ACK a7b581423e
  darosior:
    utACK a7b581423e
  sedited:
    ACK a7b581423e

Tree-SHA512: e8c01a3e2448b5d49b76a0cab3f38a2d0249b71beeb7d9d05d5ecc3812bd91d0bd1d0f78b809b6f4ccb73186fa119cb1ed3779a73284b83a67ae219ef378fa6c
This commit is contained in:
Ava Chow
2026-01-19 16:39:45 -08:00
3 changed files with 14 additions and 14 deletions

View File

@@ -229,7 +229,7 @@ class InvalidOPIFConstruction(BadTxTemplate):
def get_tx(self):
return create_tx_with_script(
self.spend_tx, 0, script_sig=b'\x64' * 35,
self.spend_tx, 0, script_sig=b'\x68' * 35,
amount=(self.spend_avail // 2))