Skip to content
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

Add invariant to WitnessTransaction that says inputs.length == witnes… #954

Conversation

Christewart
Copy link
Contributor

…ses.length

From BIP141

The witness is a serialization of all witness data of the transaction. Each txin is associated with a witness field. A witness field starts with a var_int to indicate the number of stack items for the txin. It is followed by stack items, with each item starts with a var_int to indicate the length. Witness data is NOT script.

This creates an invariant that enforces that inside of WitnessTransaction.

@Christewart Christewart added the core work for the core project label Dec 17, 2019
@Christewart Christewart merged commit caf9b7d into bitcoin-s:master Dec 17, 2019
Christewart added a commit that referenced this pull request May 1, 2021
#954)

* Add invariant to WitnessTransaction that says inputs.length == witnesses.length

* Remove println

* Address code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core work for the core project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants