server+lncfg: make sweepr batch window duration configurable

This commit is contained in:
yyforyongyu
2022-08-29 10:25:51 +08:00
parent 1aa4d047fe
commit 2f27a52f7f
4 changed files with 34 additions and 1 deletions

View File

@@ -1004,7 +1004,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
Signer: cc.Wallet.Cfg.Signer,
Wallet: cc.Wallet,
NewBatchTimer: func() <-chan time.Time {
return time.NewTimer(sweep.DefaultBatchWindowDuration).C
return time.NewTimer(cfg.Sweeper.BatchWindowDuration).C
},
Notifier: cc.ChainNotifier,
Store: sweeperStore,