test: Check that the feerate is never below...

...the requested one in assert_fee_rate
This commit is contained in:
Daniela Brozzoni 2022-08-02 11:25:09 +02:00
parent 42fde6d457
commit 00d426b885
No known key found for this signature in database
GPG Key ID: 7DE4F1FDCED0AB87

View File

@ -2022,7 +2022,7 @@ pub(crate) mod test {
let fee_rate = $fee_rate;
if !dust_change {
assert!((tx_fee_rate - fee_rate).as_sat_vb().abs() < 0.5, "Expected fee rate of {:?}, the tx has {:?}", fee_rate, tx_fee_rate);
assert!(tx_fee_rate >= fee_rate && (tx_fee_rate - fee_rate).as_sat_vb().abs() < 0.5, "Expected fee rate of {:?}, the tx has {:?}", fee_rate, tx_fee_rate);
} else {
assert!(tx_fee_rate >= fee_rate, "Expected fee rate of at least {:?}, the tx has {:?}", fee_rate, tx_fee_rate);
}