mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-04 20:19:27 +01:00
Merge bitcoin/bitcoin#32143: Fix 11-year-old mis-categorized error code in OP_IF evaluation
a7b581423eFix 11-year-old mis-categorized error code in OP_IF evaluation (Calin Culianu) Pull request description: This was introduced by commitab9edbd6b6. 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: tACKa7b581423eachow101: ACKa7b581423edarosior: utACKa7b581423esedited: ACKa7b581423eTree-SHA512: e8c01a3e2448b5d49b76a0cab3f38a2d0249b71beeb7d9d05d5ecc3812bd91d0bd1d0f78b809b6f4ccb73186fa119cb1ed3779a73284b83a67ae219ef378fa6c
This commit is contained in:
@@ -608,7 +608,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
|
||||
if (fExec)
|
||||
{
|
||||
if (stack.size() < 1)
|
||||
return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
|
||||
return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
|
||||
valtype& vch = stacktop(-1);
|
||||
// Tapscript requires minimal IF/NOTIF inputs as a consensus rule.
|
||||
if (sigversion == SigVersion::TAPSCRIPT) {
|
||||
|
||||
Reference in New Issue
Block a user