Add div_by_weight test to fee_rate

This commit is contained in:
yancy 2024-09-30 18:50:38 -05:00
parent 0b8c45ff8e
commit 16ce70d3a6
1 changed files with 6 additions and 0 deletions

View File

@ -284,6 +284,12 @@ mod tests {
assert_eq!(f, FeeRate(1));
}
#[test]
fn fee_rate_div_by_weight() {
let fee_rate = Amount::from_sat(329) / Weight::from_wu(381);
assert_eq!(fee_rate, FeeRate(863));
}
#[test]
fn checked_add() {
let f = FeeRate(1).checked_add(2).unwrap();