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
Computing witness lengths of a TxIn #2659
Comments
As discussed in |
If the witness is already populated then |
@apoelstra thanks, although my confusion is that The Witness size method returns a usize, while PredictIntputWeight constructor requires something that can be iterable. I mean size() could just be shoved into a vec but that doesn't feel like the intent. |
In most/all cases we never know the exact witness before using |
@sanket1729 hmm ok. I'll take a look at how to incorporate descriptors. Thanks! |
To use the constructor for
InputWeightPrediction
, theinput_script_len
andwitness_element_lengths
is needed. Given a TxIn and accessing the Witness field, is it possible to compute the witness_element_lengths?For example:
The
Witness
struct hascontent
andwitness_elements
(which are private) but notwitness_element_lengths
from what I can tell..The text was updated successfully, but these errors were encountered: