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

Fix allowing BytesToPushOntoStack(0) #1448

Merged
merged 2 commits into from
May 19, 2020

Conversation

benthecarman
Copy link
Collaborator

Fixes #1445

As described in #1445, BytesToPushOnStack(0) should not be valid but we were pushing OP_0 when this occurred. This fixes that problem. However, after fixing that it caused some of our tests to fail, namely anywhere that we were putting an EmptyDigitalSignature into a script signature. This was a problem because when we check if it is valid script sig, we check that it has the correct BytesToPushOnStack, however, now when pushing BytesToPushOnStack(0) we no longer add anything to the stack. Luckily, this was easily remedied by replacing these instances with an EmptyScriptSignature

@benthecarman benthecarman added bug core work for the core project labels May 19, 2020
@benthecarman benthecarman merged commit 5c7585c into bitcoin-s:master May 19, 2020
@benthecarman benthecarman deleted the bytes-to-push-fix branch May 19, 2020 21:53
Christewart pushed a commit that referenced this pull request May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core work for the core project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BytesPushOntoStack.zero is not a valid bytes to push onto stack
3 participants