Skip to content

Treat OP_1NEGATE as a small integer - #299

Closed
petertodd wants to merge 1 commit into
masterfrom
2024-03-fix-op_1negate-handling
Closed

petertodd wants to merge 1 commit into
masterfrom
2024-03-fix-op_1negate-handling

Conversation

@petertodd

Copy link
Copy Markdown
Owner

Similar to Bitcoin Core's bitcoin/bitcoin#29589

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

@dgpv

dgpv commented Mar 14, 2024

Copy link
Copy Markdown
Contributor

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.

@petertodd

Copy link
Copy Markdown
Owner Author

Closing since Bitcoin Core also closed this proposed change.

@petertodd petertodd closed this Mar 7, 2025
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.

2 participants