server+lncfg: make sweepr batch window duration configurable

This commit is contained in:
yyforyongyu committed 2022-09-01 10:44:29 +08:00
1 parent 1aa4d047fe
commit 2f27a52f7f
4 files changed
+34 -1

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package lncfg
import (
"fmt"
"time"
)
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
}