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

Check if input was entirely consumed in decoderawtransaction/btcDecode #2195

Open
brunoerg opened this issue Jun 6, 2024 · 2 comments
Open

Comments

@brunoerg
Copy link
Contributor

brunoerg commented Jun 6, 2024

Using the decoderawtransaction command (btcDecode function?) we noticed that it does not check if the entire input was successfully consumed when decoding which is important to keep it consistent.

To reproduce:

decoderawtransaction "0a9a9e0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100000000010001010101a09a"

Obs.: Running same command on Bitcoin Core fails.

@Crypt-iQ
Copy link
Collaborator

Thanks for reporting, we can address this. Seems like just an API mismatch (discarding the extra bytes vs erroring) though I think we should match bitcoind's behavior here.

@brunoerg
Copy link
Contributor Author

Thanks for reporting, we can address this. Seems like just an API mismatch (discarding the extra bytes vs erroring) though I think we should match bitcoind's behavior here.

Sounds good, thank you.

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

No branches or pull requests

2 participants