add second test case

This commit is contained in:
conduition 2023-11-10 17:19:33 +00:00
parent 0c56131819
commit 6c6c08ca50
1 changed files with 5 additions and 0 deletions

View File

@ -221,6 +221,11 @@ mod tests {
let fee = FeeRate(10).checked_mul_by_weight(Weight::MAX); let fee = FeeRate(10).checked_mul_by_weight(Weight::MAX);
assert!(fee.is_none()); assert!(fee.is_none());
let weight = Weight::from_vb(3).unwrap();
let fee_rate = FeeRate::from_sat_per_vb(3).unwrap();
let fee = fee_rate.checked_mul_by_weight(weight).unwrap();
assert_eq!(Amount::from_sat(9), fee);
} }
#[test] #[test]