mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-12 16:09:29 -05:00
Apply suggestions from code review
Co-authored-by: Daniel Karzel <daniel.karzel@coblox.tech>
This commit is contained in:
parent
dc8dd5af28
commit
e69a2c9111
@ -326,7 +326,7 @@ where
|
|||||||
Ok(Amount::from_sat(max_giveable))
|
Ok(Amount::from_sat(max_giveable))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Estimate total tx fee based for a pre-defined target block based on the
|
/// Estimate total tx fee for a pre-defined target block based on the
|
||||||
/// transaction weight. The max fee cannot be more than MAX_PERCENTAGE_FEE
|
/// transaction weight. The max fee cannot be more than MAX_PERCENTAGE_FEE
|
||||||
/// of amount
|
/// of amount
|
||||||
pub async fn estimate_fee(
|
pub async fn estimate_fee(
|
||||||
@ -357,7 +357,7 @@ fn estimate_fee(
|
|||||||
) -> Amount {
|
) -> Amount {
|
||||||
// Doing some heavy math here :)
|
// Doing some heavy math here :)
|
||||||
// `usize` is 32 or 64 bits wide, but `f32`'s mantissa is only 23 bits wide.
|
// `usize` is 32 or 64 bits wide, but `f32`'s mantissa is only 23 bits wide.
|
||||||
// This fine because such a big transaction cannot exist and there are also no
|
// This is fine because such a big transaction cannot exist and there are also no
|
||||||
// negative fees.
|
// negative fees.
|
||||||
#[allow(
|
#[allow(
|
||||||
clippy::cast_precision_loss,
|
clippy::cast_precision_loss,
|
||||||
|
Loading…
Reference in New Issue
Block a user