Skip to content
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

Treat OP_1NEGATE as a small integer #299

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

petertodd
Copy link
Owner

Similar to Bitcoin Core's bitcoin/bitcoin#29589

This is technically a breaking change, so would require a major version bump.

@dgpv
Copy link
Contributor

dgpv commented Mar 14, 2024

I voiced my concerns about changing the behavior of encode_op_n/decode_op_n in the Core's issue linked in the first message, but here I want to mention that if you proceed with this change of behavior, you will also need to fix is_witness_scriptpubkey() that uses is_small_int() to check that the witness version is in bounds. OP_1NEGATE is not allowed as witness version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants