Skip to content

Conversation

@stevenroose
Copy link
Contributor

backport of #402 which is a backport of upstream

@stevenroose stevenroose changed the title Disallow extended encoding for non-witness transactions [0.17] Disallow extended encoding for non-witness transactions Mar 21, 2019
if (!tx.HasWitness()) {
/* It's illegal to encode witnesses when all witness stacks are empty. */
throw std::ios_base::failure("Superfluous witness record");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we already check this condition in the witness serialization itself, but doesn't hurt here either.

@instagibbs
Copy link
Contributor

utACK e11c6f5

@instagibbs instagibbs merged commit e11c6f5 into ElementsProject:elements-0.17 Mar 21, 2019
instagibbs added a commit that referenced this pull request Mar 21, 2019
…tions

e11c6f5 Disallow extended encoding for non-witness transactions (Pieter Wuille)

Pull request description:

  backport of #402 which is a backport of upstream

Tree-SHA512: 01cccbc0d54a9f039ed16c88f1d9ec7ebac3a936fb4a77e664c9103e06bb142741a743ac980887ec16570429ccc0f9614e5b3076084b1c949190b3169844ed7d
@stevenroose stevenroose deleted the e17-disallow-emptywitness branch March 25, 2019 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants