wally_scriptpubkey_get_type: only check 1st byte for OP_RETURN scripts #448
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Even though a script might not be created with
wally_scriptpubkey_op_return_from_bytes
(e.g.<OP_RETURN>
) or it is not standard (e.g.<OP_RETURN OP_RETURN>
), if it's starting withOP_RETURN
, it should still be considered aOP_RETURN
script.Bitcoin Core checks [1]
rust-bitcoin does [2]
[1] https://github.com/bitcoin/bitcoin/blob/d04324a7056a735c1127ba8ccdc720a16e7281a3/src/script/script.h#L552-L555
[2] https://github.com/rust-bitcoin/rust-bitcoin/blob/9df59639cec214bd9363d426335923611a304119/bitcoin/src/blockdata/script/borrowed.rs#L350-L354