-
Notifications
You must be signed in to change notification settings - Fork 974
libwally-core blessed branch (PSETs and other fixes) #3827
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
Merged
rustyrussell
merged 8 commits into
ElementsProject:master
from
niftynei:nifty/blessed-branch
Jul 13, 2020
Merged
libwally-core blessed branch (PSETs and other fixes) #3827
rustyrussell
merged 8 commits into
ElementsProject:master
from
niftynei:nifty/blessed-branch
Jul 13, 2020
Conversation
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
Closed
we're moving over to elements!
and then use it to print out things
We don't preserve detailed asset information at the moment, so provide a way to convert from a sat to an amount_asset struct. We also need a way to convert from an 'amount_asset' to a 'value' for elements, which for explicit (i.e. non-blinded) asssets is a 0x01 prefix plus the big-endian encoded value.
PSETs have a bit different requirements. The witness_utxo needs the asset tag + values, and these should also be added to the PSET struct separately as well. To do this, we create a new 'init' method for elements inputs, which takes care of the elements specific things.
The amount we expect back, post change, is different for an elements tx
They don't contain addresses
no idea why the fees are different here now post pset, but lo and behold they are...
1aeb9ff to
94318f9
Compare
rustyrussell
approved these changes
Jul 13, 2020
Contributor
rustyrussell
left a comment
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.
Ack 94318f9
Minor leak fix can be done later...
|
|
||
| /* FIXME: persist blinded values */ | ||
| if (asset->value == 0) | ||
| return NULL; |
Contributor
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.
Leak? Try return tal_free(val)?
Contributor
|
Rebased #3825 on this and it worked. Nice! |
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.
This PR forks away libwally-core to use a branch that contains working PSETs and the ability to init transactions with no outputs (as needed by #3825).
libwally-core branch can be found here: https://github.com/niftynei/libwally-core/tree/nifty/blessed-branch; the full patchset is probably best viewed in this draft PR however: ElementsProject/libwally-core#208
Closes #3784