Skip to content

Commit 03426a6

Browse files
committed
Merge #220: tx: discountct: add missing testcase from #204
66110dc tx: discountct: add missing testcase from #204 (Pablo Greco) Pull request description: In #204 we included a lot of files for discountCT test cases, but one of the files was never tested (2in3out_tx.hex). This is just the testing of that file. ACKs for top commit: apoelstra: ACK 66110dc; successfully ran local tests Tree-SHA512: 8aba1ce9ed824187246c01783ace9498ff7ad9e6690ac7cacb5e40d676232fef2e551dabff3d964678ef28f890a835809dcd5c3f6c0d769cbdab7cd0f639d5e8
2 parents 0ea307a + 66110dc commit 03426a6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/transaction.rs

+8
Original file line numberDiff line numberDiff line change
@@ -2471,6 +2471,14 @@ mod tests {
24712471
assert_eq!(tx.discount_weight(), 1302);
24722472
assert_eq!(tx.discount_vsize(), 326);
24732473

2474+
let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in3out_tx.hex"));
2475+
assert_eq!(tx.input.len(), 2);
2476+
assert_eq!(tx.output.len(), 3);
2477+
assert_eq!(tx.weight(), 10300);
2478+
assert_eq!(tx.vsize(), 2575);
2479+
assert_eq!(tx.discount_weight(), 1302);
2480+
assert_eq!(tx.discount_vsize(), 326);
2481+
24742482
let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in3out_tx2.hex"));
24752483
assert_eq!(tx.input.len(), 2);
24762484
assert_eq!(tx.output.len(), 3);

0 commit comments

Comments
 (0)