multi: merge DetermineFeePerKw and Estimate
This commit moves `DetermineFeePerKw` into the `Estimate` method on `FeePreference`. A few callsites previously calling `DetermineFeePerKw` without the max fee rate is now also temporarily fixed by forcing them to use `Estimate` with the default sweeper max fee rate.
This commit is contained in:
8 files changed
+228
-179
No files matched your search
+6
-6
@@ -222,12 +222,12 @@ func CalculateFeeRate(satPerByte, satPerVByte uint64, targetConf uint32,
|
||||
|
||||
// Based on the passed fee related parameters, we'll determine an
|
||||
// appropriate fee rate for this transaction.
|
||||
feeRate, err := sweep.DetermineFeePerKw(
|
||||
estimator, sweep.FeePreference{
|
||||
ConfTarget: targetConf,
|
||||
FeeRate: satPerKw,
|
||||
},
|
||||
)
|
||||
feePref := sweep.FeePreference{
|
||||
ConfTarget: targetConf,
|
||||
FeeRate: satPerKw,
|
||||
}
|
||||
// TODO(yy): need to pass the configured max fee here.
|
||||
feeRate, err := feePref.Estimate(estimator, 0)
|
||||
if err != nil {
|
||||
return feeRate, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user