server+lncfg: make sweepr batch window duration configurable
This commit is contained in:
4 files changed
+34
-1
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user