-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Optimize OPS type from Record to Enum #2189
Conversation
Going a step further, maybe we can remove REVERSE_OPS directly. Which a bit redundant |
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.
Please make fix for the logic change. Also add a test to show that hex pushdatas that look like numbers in REVERSE_OPS are properly done as PUSHDATA.
Thanks for the fix and tests. Could you also add a test for fromASM similar to how this edge case test for toASM works?: bitcoinjs-lib/test/script.spec.ts Lines 44 to 57 in e0c3ede
See how this test is testing an edge case for toASM (making sure empty array is OP_FALSE) Can you add an edge case test for fromASM testing that |
of course |
PR:https://github.com/bitcoinjs/bitcoinjs-lib/pull/2028/files
Issue: Better types for opcodes #1966