Repository navigation
Test the two sig_ops boundaries no case reached (closes #2775) - #2776
Merged
Merged
Conversation
_last_push could read OP_16 as a non-push and _sig_op_count could leave OP_1 out of the accurate range with sig_ops_test.py still passing. An OP_16 before the redeem-script push now covers the first, and a 1-of-1 multisig the second; each case fails under its mutant with only this file run. Signed-off-by: dodoshell <326978213+dodoshell@users.noreply.github.com>
fametrano
approved these changes
Oct 23, 2026
fametrano
left a comment
Member
There was a problem hiding this comment.
Approves f8c5223, as the human decided.
A fresh local reviewer CLEARED f8c5223, with no rebase since. Every check passed or was skipped but Claude review, which is the bot's weekly quota (429, resets 2026-10-24T11:00 UTC), so there is no bot ACK: run. Not checked here: the mutants beyond the two the commit names.
Member
|
Landed as 3897e4f. Thank you, @dodoshell: both boundaries now have a case that fails under its mutant. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Closes #2775
Adds the two cases the issue names to
tests/script/sig_ops_test.py:test_p2sh_sig_op_count[op-16-is-push-only-too]:OP_16before thepush of
_S2, so_last_pushhas to treatOP_16as push only;test_accurate_sig_op_count[op-1-is-one]: a 1-of-1 multisig, legacy20 and accurate 1, so
OP_1has to be inside the accurate range.No source change.
How it was verified
On
e5b6e09awith this commit,uv run pytest tests/script/sig_ops_test.py:if op_code >= _OP_16in_last_push: onlytest_p2sh_sig_op_count[op-16-is-push-only-too]fails;_OP_1 < last_op_codein_sig_op_count: onlytest_accurate_sig_op_count[op-1-is-one]fails.Checks
uv run pre-commit run --all-filesis clean (ruff, mypy strict,markdownlint, the copyright notice,
uv.lock)uv run pytestpassesAnything the reviewer should know
I ran both commands on Windows with Python 3.13.
uv run pytest: 19942passed, 100 skipped. In the hooks run,
mixed-line-endingflagged onlythe CRLF checkout that
core.autocrlfmakes here, andcheck-changelogcould not start because there is no
python3on the PATH. Running itsscript directly with the venv's interpreter
(
.github/scripts/check_changelog.py --grandfathered 23) passes.