mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 01:18:17 +02:00
lnwallet+sweep: add String method to FeePreference
This commit is contained in:
@@ -30,6 +30,14 @@ type FeePreference struct {
|
||||
FeeRate lnwallet.SatPerKWeight
|
||||
}
|
||||
|
||||
// String returns a human-readable string of the fee preference.
|
||||
func (p FeePreference) String() string {
|
||||
if p.ConfTarget != 0 {
|
||||
return fmt.Sprintf("%v blocks", p.ConfTarget)
|
||||
}
|
||||
return p.FeeRate.String()
|
||||
}
|
||||
|
||||
// DetermineFeePerKw will determine the fee in sat/kw that should be paid given
|
||||
// an estimator, a confirmation target, and a manual value for sat/byte. A
|
||||
// value is chosen based on the two free parameters as one, or both of them can
|
||||
|
Reference in New Issue
Block a user