github.com/decred/dcrlnd@v0.7.6/lncfg/wtclient.go (about) 1 package lncfg 2 3 import "fmt" 4 5 // WtClient holds the configuration options for the daemon's watchtower client. 6 type WtClient struct { 7 // Active determines whether a watchtower client should be created to 8 // back up channel states with registered watchtowers. 9 Active bool `long:"active" description:"Whether the daemon should use private watchtowers to back up revoked channel states."` 10 11 // PrivateTowerURIs specifies the lightning URIs of the towers the 12 // watchtower client should send new backups to. 13 PrivateTowerURIs []string `long:"private-tower-uris" description:"(Deprecated) Specifies the URIs of private watchtowers to use in backing up revoked states. URIs must be of the form <pubkey>@<addr>. Only 1 URI is supported at this time, if none are provided the tower will not be enabled."` 14 15 // SweepFeeRate specifies the fee rate in sat/byte to be used when 16 // constructing justice transactions sent to the tower. 17 SweepFeeRate uint64 `long:"sweep-fee-rate" description:"Specifies the fee rate in sat/byte to be used when constructing justice transactions sent to the watchtower."` 18 } 19 20 // Validate ensures the user has provided a valid configuration. 21 // 22 // NOTE: Part of the Validator interface. 23 func (c *WtClient) Validate() error { 24 // TODO(wilmer): remove in v0.9.0 release. 25 if len(c.PrivateTowerURIs) > 0 { 26 fmt.Println("The `wtclient.private-tower-uris` option has " + 27 "been deprecated as of v0.8.0-beta and will be " + 28 "removed in v0.9.0-beta. To setup watchtowers for " + 29 "the client, set `wtclient.active` and run " + 30 "`dcrlncli wtclient -h` for more information.") 31 } 32 33 return nil 34 } 35 36 // Compile-time constraint to ensure WtClient implements the Validator 37 // interface. 38 var _ Validator = (*WtClient)(nil)