lnd/lncfg/watchtower.go
Elle Mouton f3525e8b7c
multi: add default watchtower config to main LND config
In this commit, a `DefaultWatchtowerCfg` function is added which is used
to construct a default `lncfg.Watchtower` struct. This is then used to
populate the default watchtower config in the main LND config struct.
2023-06-15 11:36:44 +02:00

27 lines
686 B
Go

package lncfg
import "github.com/lightningnetwork/lnd/watchtower"
// Watchtower holds the daemon specific configuration parameters for running a
// watchtower that shares resources with the daemon.
//
//nolint:lll
type Watchtower struct {
Active bool `long:"active" description:"If the watchtower should be active or not"`
TowerDir string `long:"towerdir" description:"Directory of the watchtower.db"`
watchtower.Conf
}
// DefaultWatchtowerCfg creates a Watchtower with some default values filled
// out.
func DefaultWatchtowerCfg(defaultTowerDir string) *Watchtower {
conf := watchtower.DefaultConf()
return &Watchtower{
TowerDir: defaultTowerDir,
Conf: *conf,
}
}