Closed uncomputable closed 9 months ago
Rebased, squashed and ready for review
f28ec2f353b158ed7d49d9c5b99bdedd12a97f2d looks great! All my comments are fairly minor.
Rebased and addressed some of the nits. Thanks for the helpful comments.
Rebased and addressed the remaining comments.
In a followup PR we should maybe replace Vec<Vec<u8>>
with Witness
which is more efficiently implemented (in particular it doesn't make you serialize to a sink to get its length).
But I think that would require changes in rust-elements first which maybe we don't want to bother with (in general, we are just keeping rust-elements on life support until rust-bitcoin 1.0 when we will need to more-or-less rewrite it to match the rust-bitcoin API).
Extend the
Cost
struct to compute the necessary padding based on a given witness stack. Test the new methods. Keep the changes to the public API minimal.