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

+7
View File
@@ -41,6 +41,7 @@ import (
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/routing"
"github.com/lightningnetwork/lnd/signal"
"github.com/lightningnetwork/lnd/sweep"
"github.com/lightningnetwork/lnd/tor"
)
@@ -439,6 +440,8 @@ type Config struct {
RemoteSigner *lncfg.RemoteSigner `group:"remotesigner" namespace:"remotesigner"`
Sweeper *lncfg.Sweeper `group:"sweeper" namespace:"sweeper"`
// LogWriter is the root logger that all of the daemon's subloggers are
// hooked up to.
LogWriter *build.RotatingLogWriter
@@ -635,6 +638,9 @@ func DefaultConfig() Config {
RemoteSigner: &lncfg.RemoteSigner{
Timeout: lncfg.DefaultRemoteSignerRPCTimeout,
},
Sweeper: &lncfg.Sweeper{
BatchWindowDuration: sweep.DefaultBatchWindowDuration,
},
}
}
@@ -1651,6 +1657,7 @@ func ValidateConfig(cfg Config, interceptor signal.Interceptor, fileParser,
cfg.HealthChecks,
cfg.RPCMiddleware,
cfg.RemoteSigner,
cfg.Sweeper,
)
if err != nil {
return nil, err