mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
f3525e8b7c
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.
27 lines
686 B
Go
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,
|
|
}
|
|
}
|