sweep: remove unused param Fee

This commit is contained in:
yyforyongyu committed 2024-04-23 04:44:00 +08:00
1 parent 54aaeea491
commit 9c5124e117
3 files changed
-45

No files matched your search

@@ -1,7 +1,6 @@
package contractcourt
import (
"fmt"
"testing"
"time"
@@ -135,20 +134,6 @@ func (s *mockSweeper) SweepInput(input input.Input, params sweep.Params) (
s.sweptInputs <- input
// TODO(yy): replace mockSweeper with `mock.Mock`.
if params.Fee != nil {
fee, ok := params.Fee.(sweep.FeeEstimateInfo)
if !ok {
return nil, fmt.Errorf("unexpected fee type: %T",
params.Fee)
}
// Update the deadlines used if it's set.
if fee.ConfTarget != 0 {
s.deadlines = append(s.deadlines, int(fee.ConfTarget))
}
}
// Update the deadlines used if it's set.
params.DeadlineHeight.WhenSome(func(d int32) {
s.deadlines = append(s.deadlines, int(d))