Skip to content

Commit

Permalink
3x the high priority fee
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Oct 7, 2023
1 parent d23148c commit b63fcb0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mutiny-core/src/fees.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,13 @@ impl<S: MutinyStorage> FeeEstimator for MutinyFeeEstimator<S> {
log_trace!(self.logger, "Got fee rate from saved cache!");
let sats_vbyte = num.to_owned();
// convert to sats per kw
let fee_rate = sats_vbyte * 250.0;
let mut fee_rate = sats_vbyte * 250.0;

// if we're using the high priority target, multiply by 3
// this should help prevent force closures from fee disputes
if confirmation_target == ConfirmationTarget::HighPriority {
fee_rate *= 3.0;
}

// return the fee rate, but make sure it's not lower than the floor
(fee_rate as u32).max(FEERATE_FLOOR_SATS_PER_KW)
Expand Down

0 comments on commit b63fcb0

Please sign in to comment.