From: codeShark149 Date: Tue, 27 Jul 2021 19:20:55 +0000 (+0530) Subject: Fix float substraction error X-Git-Tag: 0.10.0~9 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/enum.FileStoreError.html?a=commitdiff_plain;h=adceafa40c65dbe462fd554b51acdac0421f17d0;p=bdk Fix float substraction error --- diff --git a/src/wallet/coin_selection.rs b/src/wallet/coin_selection.rs index c4c88e75..e0ce1dfb 100644 --- a/src/wallet/coin_selection.rs +++ b/src/wallet/coin_selection.rs @@ -822,7 +822,7 @@ mod test { assert_eq!(result.selected.len(), 3); assert_eq!(result.selected_amount(), 300_010); - assert!((result.fee_amount - 254.0).abs() < f32::EPSILON); + assert!((result.fee_amount as f32 - 254.0).abs() < f32::EPSILON); } #[test]