sweep: remove unused param Fee
This commit is contained in:
3 files changed
-45
No files matched your search
@@ -99,8 +99,6 @@ func (c *anchorResolver) Resolve(_ bool) (ContractResolver, error) {
|
||||
// After a restart or when the remote force closes, the sweeper is not
|
||||
// yet aware of the anchor. In that case, it will be added as new input
|
||||
// to the sweeper.
|
||||
relayFeeRate := c.Sweeper.RelayFeePerKW()
|
||||
|
||||
witnessType := input.CommitmentAnchor
|
||||
|
||||
// For taproot channels, we need to use the proper witness type.
|
||||
@@ -116,9 +114,6 @@ func (c *anchorResolver) Resolve(_ bool) (ContractResolver, error) {
|
||||
resultChan, err := c.Sweeper.SweepInput(
|
||||
&anchorInput,
|
||||
sweep.Params{
|
||||
Fee: sweep.FeeEstimateInfo{
|
||||
FeeRate: relayFeeRate,
|
||||
},
|
||||
// For normal anchor sweeping, the budget is 330 sats.
|
||||
Budget: btcutil.Amount(
|
||||
anchorInput.SignDesc().Output.Value,
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user