-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Fix 11-year-old mis-categorized error code in OP_IF evaluation #32143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32143. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste ConflictsNo conflicts as of last run. |
|
🚧 At least one of the CI tasks failed. HintsTry to run the tests locally, according to the documentation. However, a CI failure may still
Leave a comment here, if you need help tracking down a confusing failure. |
|
This is failing the "test each commit" check. Please squash test commits where needed to make sure that the intermediate commits pass the tests, too. Details |
This was introduced by commit ab9edbd. 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. Also in this commit: - Fix script_tests to adjust to the corrected error message - Fix p2p_invalid_tx functional test to produce the desired error message
|
Ok, squashed. |
darosior
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK a7b5814
|
tACK a7b5814 Cherry-picked on latest master (2bcb3f6) and ran all unit tests (including script_asset_tests). UNBALANCED_CONDITIONAL is intended for:
UNBALANCED_CONDITIONAL does not make sense when OP_IF/NOTIF does not have a value to pop from the stack. INVALID_STACK_OPERATION makes sense in that case. |
This was introduced by commit ab9edbd.
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 .