Skip to content

Commit

Permalink
Fix units for fee estimation functions
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Sep 21, 2023
1 parent 9a50818 commit c2e0218
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mutiny-core/src/nodemanager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1460,18 +1460,28 @@ impl<S: MutinyStorage> NodeManager<S> {
}
}

/// Gets a fee estimate for a very low priority transaction.
/// Value is in sat/vbyte.
pub fn estimate_fee_low(&self) -> u32 {
self.fee_estimator
.get_est_sat_per_1000_weight(ConfirmationTarget::Background)
/ 250
}

/// Gets a fee estimate for an average priority transaction.
/// Value is in sat/vbyte.
pub fn estimate_fee_normal(&self) -> u32 {
self.fee_estimator
.get_est_sat_per_1000_weight(ConfirmationTarget::Normal)
/ 250
}

/// Gets a fee estimate for an high priority transaction.
/// Value is in sat/vbyte.
pub fn estimate_fee_high(&self) -> u32 {
self.fee_estimator
.get_est_sat_per_1000_weight(ConfirmationTarget::HighPriority)
/ 250
}

/// Creates a new lightning node and adds it to the manager.
Expand Down

0 comments on commit c2e0218

Please sign in to comment.