]> Untitled Git - bdk/commitdiff
Fix float substraction error
authorcodeShark149 <rajarshi149@gmail.com>
Tue, 27 Jul 2021 19:20:55 +0000 (00:50 +0530)
committerAlekos Filini <alekos.filini@gmail.com>
Wed, 28 Jul 2021 09:52:51 +0000 (11:52 +0200)
src/wallet/coin_selection.rs

index c4c88e75c18e916f5735ec42cf753d280ae516fb..e0ce1dfb3425e1d9ec1c7d72e69f38404019baab 100644 (file)
@@ -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]