config: add --noencryptwallet flag

This commit add the --noencryptwallet flag to lnd config, to be
used by users wanting to disable wallet encryption.
This commit is contained in:
Johan T. Halseth 2017-10-12 11:19:51 +02:00 committed by Olaoluwa Osuntokun
parent b7ba2697c8
commit f1c7dc1cbd

@ -35,6 +35,7 @@ const (
defaultRPCHost = "localhost"
defaultMaxPendingChannels = 1
defaultNumChanConfs = 1
defaultNoEncryptWallet = false
)
var (
@ -128,6 +129,8 @@ type config struct {
Autopilot *autoPilotConfig `group:"autopilot" namespace:"autopilot"`
NoNetBootstrap bool `long:"nobootstrap" description:"If true, then automatic network bootstrapping will not be attempted."`
NoEncryptWallet bool `long:"noencryptwallet" description:"If set, wallet will be encrypted using the default passphrase."`
}
// loadConfig initializes and parses the config using a config file and command
@ -153,6 +156,7 @@ func loadConfig() (*config, error) {
RESTPort: defaultRESTPort,
MaxPendingChannels: defaultMaxPendingChannels,
DefaultNumChanConfs: defaultNumChanConfs,
NoEncryptWallet: defaultNoEncryptWallet,
Bitcoin: &chainConfig{
RPCHost: defaultRPCHost,
RPCCert: defaultBtcdRPCCertFile,