mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
server+lncfg: make sweepr batch window duration configurable
This commit is contained in:
19
lncfg/sweeper.go
Normal file
19
lncfg/sweeper.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user