4223655829 Add test case (yancy)

Pull request description:

  Since there are test cases for other functions here, add test case as follow up for https://github.com/rust-bitcoin/rust-bitcoin/pull/3604.  I forgot to request this during review.

ACKs for top commit:
  apoelstra:
    ACK 422365582964cf405529de3a1cf63d766b0d0e2e; successfully ran local tests
  tcharding:
    ACK 4223655829

Tree-SHA512: 8629cfff3e3eb800aa4d4625627e0a777c389566f4125bc63e67fe4c5a597ca63b9fb92da42f6c9dab12e6c63839eef35a13957f98606a37ed687eb96d896c2e
This commit is contained in:
merge-script 2024-11-15 04:24:13 +00:00
commit 3ba3079edf
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 6 additions and 0 deletions

View File

@ -330,6 +330,12 @@ mod tests {
assert_eq!(FeeRate(2500), fee_rate);
}
#[test]
fn fee_rate_from_sat_per_kvb() {
let fee_rate = FeeRate::from_sat_per_kvb(10);
assert_eq!(FeeRate(2), fee_rate);
}
#[test]
fn fee_rate_from_sat_per_vb_overflow() {
let fee_rate = FeeRate::from_sat_per_vb(u64::MAX);