Psbt extensions and elements psbt serialization - #186
Closed
achow101 wants to merge 8 commits into
Closed
Conversation
Byte vectors in a PSBT could have a 0 length and thus result in duplicate keys in a PSBT as length 0 is also assumed that there is no vector for that field. Instead of checking length, check that the pointer is non-null. To ensure the pointers are non-null, malloc 1 byte. The length is still stored as 0.
achow101
force-pushed
the
psbt-ext
branch
3 times, most recently
from
May 15, 2020 20:55
a612c7d to
ad9c84d
Compare
wally_psbt_elements_init_alloc is added to set an elements magic wally_psbt_init_alloc, wally_psbt_to_bytes, and wally_psbt_from_bytes are updated to deal with this magic instead of the hard coded magic. wally_psbt_is_elements is added.
Contributor
Author
|
Someone who is more familiar with elements should probably add the elements specific things to Additionally, it is not clear to me how to test these changes as elements doesn't have serialization tests like there are for BIP 174. |
Contributor
Author
|
Redoing this on top of #191 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements the latest additions to BIP 174 (version field, types are compact size unsigned int, proprietary types) as well as the Elements PSBT proprietary fields.