lnd/lncfg/sweeper.go
yyforyongyu 84fd911b47
multi: fix make lint
Fixes new lint errors caught by the latest version.
2022-11-18 20:48:23 +08:00

21 lines
516 B
Go

package lncfg
import (
"fmt"
"time"
)
//nolint:lll
type Sweeper struct {
BatchWindowDuration time.Duration `long:"batchwindowduration" description:"Duration of the sweep batch window. The sweep is held back during the batch window to allow more inputs to be added and thereby lower the fee per input."`
}
// Validate checks the values configured for the sweeper.
func (s *Sweeper) Validate() error {
if s.BatchWindowDuration < 0 {
return fmt.Errorf("batchwindowduration must be positive")
}
return nil
}