Closed jakecraige closed 6 years ago
Change looks good, but can we come up with some nicer function names? script_pubkey_from_outpoint_tx_or_tx_out_or_script
is rather outrageous.
@zquestz agreed. Any recommendations? Ideally there's be some word to shorten outpoint_tx_or_tx_out_or_script
to which would help in a few places in this file.
Maybe something like outpoint_info
and update the comment to describe it's available values?
@jakecraige I like that, seems reasonable to me. Maybe output_data
.
LGTM
Support TxOut when verifying an input sig
This adds support providing a TxOut when verifying an input signature.
This is useful in one of our use cases where we need to sign a transaction but only have enough information to craft a TxOut, not a full Tx. Since that provides the same information as the Tx does, this option now supports that.
Because the duck-typing was used in a few places I extracted it out to a method than can be used in a multiple places.
Verify sig length before parsing
When verifying an incomplete multisig transaction, we end up with a list of drop_sigs like so:
This resolves a bug where we attempted to parse it which would raise in the
parse_sig
method. We now reject the sig unless it's present.