Add a test parsing transaction with a huge witness

This transaction broke past versions of `rust-bitcoin` and LND so this
adds a test to avoid reintroducing the problem in the future.

See also https://github.com/romanz/electrs/issues/783
This commit is contained in:
Martin Habovstiak 2022-11-01 14:27:38 +01:00
parent d8e94cf181
commit d6ca7e4b9f
2 changed files with 7 additions and 0 deletions

View File

@ -1343,6 +1343,12 @@ mod tests {
}
}
#[test]
fn test_huge_witness() {
use crate::hashes::hex::FromHex;
deserialize::<Transaction>(&Vec::from_hex(include_str!("../../tests/data/huge_witness.hex").trim()).unwrap()).unwrap();
}
#[test]
#[cfg(feature="bitcoinconsensus")]
fn test_transaction_verify () {

File diff suppressed because one or more lines are too long