Skip to content

Commit

Permalink
Merge c65c77c into merged_master (Bitcoin PR #14039)
Browse files Browse the repository at this point in the history
  • Loading branch information
apoelstra committed Oct 28, 2020
2 parents 18ec2e5 + c65c77c commit bbb4535
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/primitives/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ inline void UnserializeTransaction(TxType& tx, Stream& s) {
s >> tx.witness.vtxinwit[i].m_pegin_witness.stack;
}
}

if (!tx.HasWitness()) {
/* It's illegal to encode witnesses when all witness stacks are empty. */
throw std::ios_base::failure("Superfluous witness record");
}
}
s >> tx.nLockTime;
}
Expand Down

0 comments on commit bbb4535

Please sign in to comment.