Skip to content

Commit

Permalink
tx: discountct: add missing testcase from #204
Browse files Browse the repository at this point in the history
  • Loading branch information
psgreco committed Feb 14, 2025
1 parent 0ea307a commit 66110dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2471,6 +2471,14 @@ mod tests {
assert_eq!(tx.discount_weight(), 1302);
assert_eq!(tx.discount_vsize(), 326);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in3out_tx.hex"));
assert_eq!(tx.input.len(), 2);
assert_eq!(tx.output.len(), 3);
assert_eq!(tx.weight(), 10300);
assert_eq!(tx.vsize(), 2575);
assert_eq!(tx.discount_weight(), 1302);
assert_eq!(tx.discount_vsize(), 326);

let tx: Transaction = hex_deserialize!(include_str!("../tests/data/2in3out_tx2.hex"));
assert_eq!(tx.input.len(), 2);
assert_eq!(tx.output.len(), 3);
Expand Down

0 comments on commit 66110dc

Please sign in to comment.