Skip to content

Commit

Permalink
chore: make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlinjin committed Sep 7, 2024
1 parent 434c6e8 commit e03e983
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/coin_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ impl<'a> CoinSelector<'a> {
let mut excess_waste = self.excess(target, drain).max(0) as f32;
// we allow caller to discount this waste depending on how wasteful excess actually is
// to them.
excess_waste *= excess_discount.max(0.0).min(1.0);
excess_waste *= excess_discount.clamp(0.0, 1.0);
waste += excess_waste;
} else {
waste +=
Expand Down
8 changes: 4 additions & 4 deletions src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ impl TargetOutputs {
/// There are two orthogonal constraints:
///
/// - `rate`: The feerate of the transaction must at least be this high. You set this to control how
/// quickly your transaction is confirmed. Typically a coin selection will try and hit this target
/// exactly but it might go over if the `replace` constraint takes precedence or if the
/// [`ChangePolicy`] determines that the excess value should just be given to miners (rather than
/// create a change output).
/// quickly your transaction is confirmed. Typically a coin selection will try and hit this target
/// exactly but it might go over if the `replace` constraint takes precedence or if the
/// [`ChangePolicy`] determines that the excess value should just be given to miners (rather than
/// create a change output).
/// - `replace`: The selection must have a high enough fee to satisfy [RBF rule 4]
///
/// [RBF rule 4]: https://github.com/bitcoin/bitcoin/blob/master/doc/policy/mempool-replacements.md#current-replace-by-fee-policy
Expand Down

0 comments on commit e03e983

Please sign in to comment.