Review updates - #210
Merged
Merged
Conversation
Doesn't affect functionality since SHA256_LEN is the same size, but this reads better.
…heck Checked in here to not lose it until this is pushed upstream. Wally only uses v0 addresses at the time of commiting. Note that the inverse function segwit_addr_decode() isn't affected as it implicitly casts uint8 -> int32 so witver cannot be negative on return.
Also update version to uin32_t (currently always passed as 0).
…riable This ensures we leave written as 0 in the case of an error.
For example, output being NULL should return WALLY_EINVAL.
Exposes the types used by the setters and renames some things so the existing SWIG pattern matches work for types.
There were no calls that take these functions so removing them should not cause any issues. Modifying the PSBTs transaction inputs and outputs will be added, which like psbt_set_global_tx() will update the PSBT to reflect the tx status. Otherwise for all other operations the caller will only need to set values within the existing PSBT inputs and outputs. This will save a lot of boilerplate and wrapping code from being required, and fits with e.g. c-lightnings view of how PSBTs will be manipulated.
SWIG wrappers should use the indexed setters exposed through swig_int.h to set values through the psbt, since they can't get pointers to the input and output items.
This will be even cleaner once pubkey is converted to a ptr + length from its current array form.
These should have followed the model of the transaction code; when Elements support is compiled in, inputs and outputs *are* Elements inputs and outputs and elements members can be set like any other members.
The previous interface was unusable: no users should be affected, so we just note that the new interface is final to fulfill the contract we have w.r.t. updating CHANGES.md for API changes.
jgriffiths
force-pushed
the
review_updates
branch
from
July 22, 2020 12:48
559746c to
1b61666
Compare
Contributor
|
I went through the changed code and it looks good to me. utACK 1b61666 |
The incorrect constant has the same size so this isn't an API change; it just makes the code a little clearer.
jgriffiths
force-pushed
the
review_updates
branch
from
July 22, 2020 22:17
834316f to
6adbd24
Compare
This required changes to paramater names to match the transaction fields, and includes documentation fixes and length checks for the setter functions.
jgriffiths
force-pushed
the
review_updates
branch
from
July 22, 2020 22:50
6adbd24 to
846a4d8
Compare
Also fix innteger setters to go through the setter function to get proper error checking.
jgriffiths
force-pushed
the
review_updates
branch
from
July 23, 2020 13:11
f2a8cba to
f6ef719
Compare
Note the definition of EC_FLAGS_ALL uses the hex values as the JS bindings require this to compile.
libsecp always produces low-s signatures so this isn't required.
Contributor
|
New changes looks good too, utACK c9c45b6 |
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.
A large set of fixes and updates encompassing:
Although there remains a significant amount of PSBT work to complete, I think this is worth merging now so that the lightning peeps can move back to wally master instead of their hacked/blessed branch, and further changes can be smaller and more easily reviewable.
Obsoletes or includes the following PRs: #208 #207 #206 #204 #201 #199 #198 #194 #193 #191
Fixes #205
Fixes #189
Fixes #184
Fixes #139