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
+3
-1
@@ -1428,7 +1428,9 @@ func (s *UtxoSweeper) handleUpdateReq(req *updateReq) (
|
||||
func (s *UtxoSweeper) CreateSweepTx(inputs []input.Input,
|
||||
feePref FeePreference) (*wire.MsgTx, error) {
|
||||
|
||||
feePerKw, err := DetermineFeePerKw(s.cfg.FeeEstimator, feePref)
|
||||
feePerKw, err := feePref.Estimate(
|
||||
s.cfg.FeeEstimator, s.cfg.MaxFeeRate.FeePerKWeight(),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user