lncfg: show deprecated warning for wtclient.private-tower-uris option
A proper deprecated config option should show a warning to the user rather than preventing the daemon from starting.
This commit is contained in:
parent
26954b3718
commit
cf04b4cfc8
@ -1,6 +1,6 @@
|
|||||||
package lncfg
|
package lncfg
|
||||||
|
|
||||||
import "errors"
|
import "fmt"
|
||||||
|
|
||||||
// WtClient holds the configuration options for the daemon's watchtower client.
|
// WtClient holds the configuration options for the daemon's watchtower client.
|
||||||
type WtClient struct {
|
type WtClient struct {
|
||||||
@ -21,13 +21,13 @@ type WtClient struct {
|
|||||||
//
|
//
|
||||||
// NOTE: Part of the Validator interface.
|
// NOTE: Part of the Validator interface.
|
||||||
func (c *WtClient) Validate() error {
|
func (c *WtClient) Validate() error {
|
||||||
|
// TODO(wilmer): remove in v0.9.0 release.
|
||||||
if len(c.PrivateTowerURIs) > 0 {
|
if len(c.PrivateTowerURIs) > 0 {
|
||||||
return errors.New("`wtclient.private-tower-uris` is " +
|
fmt.Println("The `wtclient.private-tower-uris` option has " +
|
||||||
"deprecated and will be removed in the v0.8.0 " +
|
"been deprecated as of v0.8.0-beta and will be " +
|
||||||
"release, to specify watchtowers remove " +
|
"removed in v0.9.0-beta. To setup watchtowers for " +
|
||||||
"`wtclient.private-tower-uris`, set " +
|
"the client, set `wtclient.active` and run " +
|
||||||
"`wtclient.active`, and check out `lncli wtclient -h` " +
|
"`lncli wtclient -h` for more information.")
|
||||||
"for more information on how to manage towers")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user