test: Add unit test for SCRIPT_ERR_NUMEQUALVERIFY
What changed, and why it matters
This commit adds a single new test case to Bitcoin Core's script test suite. It checks that when two unequal numbers are compared with the NUMEQUALVERIFY opcode, the script correctly fails with the expected error code. There is no change to production code, no bug fix, and no security-relevant behavior change.
No action required. This is a benign test-only addition.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds one JSON test vector to src/test/data/script_tests.json: pushing 2 and 0 onto the stack, then executing NUMEQUALVERIFY under P2SH,STRICTENC flags, expecting SCRIPT_ERR_NUMEQUALVERIFY. This is purely a coverage improvement for the existing interpreter test harness; no consensus, P2P, wallet, or scripting logic is modified.
Changed components
src/test/data/script_tests.jsonInspect captured patch +1 / −0
diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json
index e276fec2..452eca88 100644
--- a/src/test/data/script_tests.json
+++ b/src/test/data/script_tests.json
@@ -438,6 +438,7 @@
["-1 0", "BOOLOR", "P2SH,STRICTENC", "OK"],
["0 0", "NUMEQUAL", "P2SH,STRICTENC", "OK"],
["0 0", "NUMEQUALVERIFY 1", "P2SH,STRICTENC", "OK"],
+["2 0", "NUMEQUALVERIFY", "P2SH,STRICTENC", "NUMEQUALVERIFY"],
["-1 0", "NUMNOTEQUAL", "P2SH,STRICTENC", "OK"],
["-1 0", "LESSTHAN", "P2SH,STRICTENC", "OK"],
["1 0", "GREATERTHAN", "P2SH,STRICTENC", "OK"],
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.