sweep: remove unused param Fee

This commit is contained in:
yyforyongyu
2024-04-11 17:48:08 +08:00
parent 54aaeea491
commit 9c5124e117
3 changed files with 0 additions and 45 deletions

View File

@@ -43,11 +43,6 @@ var (
// Params contains the parameters that control the sweeping process.
type Params struct {
// Fee is the fee preference of the client who requested the input to be
// swept. If a confirmation target is specified, then we'll map it into
// a fee rate whenever we attempt to cluster inputs for a sweep.
Fee FeePreference
// ExclusiveGroup is an identifier that, if set, prevents other inputs
// with the same identifier from being batched together.
ExclusiveGroup *uint64
@@ -211,13 +206,6 @@ func (p *SweeperInput) String() string {
return fmt.Sprintf("%v (%v)", p.Input.OutPoint(), p.Input.WitnessType())
}
// parameters returns the sweep parameters for this input.
//
// NOTE: Part of the txInput interface.
func (p *SweeperInput) parameters() Params {
return p.params
}
// terminated returns a boolean indicating whether the input has reached a
// final state.
func (p *SweeperInput) terminated() bool {
@@ -512,18 +500,6 @@ func (s *UtxoSweeper) SweepInput(inp input.Input,
return nil, errors.New("nil input received")
}
// Ensure the client provided a sane fee preference.
//
// TODO(yy): remove this check?
if params.Fee != nil {
_, err := params.Fee.Estimate(
s.cfg.FeeEstimator, s.cfg.MaxFeeRate.FeePerKWeight(),
)
if err != nil {
return nil, err
}
}
absoluteTimeLock, _ := inp.RequiredLockTime()
log.Infof("Sweep request received: out_point=%v, witness_type=%v, "+
"relative_time_lock=%v, absolute_time_lock=%v, amount=%v, "+
@@ -1145,7 +1121,6 @@ func (s *UtxoSweeper) handleUpdateReq(req *updateReq) (
// Create the updated parameters struct. Leave the exclusive group
// unchanged.
newParams := Params{
Fee: req.params.Fee,
StartingFeeRate: req.params.StartingFeeRate,
Immediate: req.params.Immediate,
Budget: req.params.Budget,