mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-09 21:56:47 +01:00
lncfg: makr tor.v2 as deprecated
This commit is contained in:
@@ -24,14 +24,16 @@ func TestConfigToFlatMap(t *testing.T) {
|
||||
cfg.DB.Etcd.Pass = testPassword
|
||||
cfg.DB.Postgres.Dsn = testPassword
|
||||
|
||||
// Set a deprecated field.
|
||||
// Set deprecated fields.
|
||||
cfg.Bitcoin.Active = true
|
||||
cfg.Tor.V2 = true
|
||||
|
||||
result, deprecated, err := configToFlatMap(cfg)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Check that the deprecated option has been parsed out.
|
||||
require.Contains(t, deprecated, "bitcoin.active")
|
||||
require.Contains(t, deprecated, "tor.v2")
|
||||
|
||||
// Pick a couple of random values to check.
|
||||
require.Equal(t, DefaultLndDir, result["lnddir"])
|
||||
|
||||
@@ -12,7 +12,7 @@ type Tor struct {
|
||||
Control string `long:"control" description:"The host:port that Tor is listening on for Tor control connections"`
|
||||
TargetIPAddress string `long:"targetipaddress" description:"IP address that Tor should use as the target of the hidden service"`
|
||||
Password string `long:"password" description:"The password used to arrive at the HashedControlPassword for the control port. If provided, the HASHEDPASSWORD authentication method will be used instead of the SAFECOOKIE one."`
|
||||
V2 bool `long:"v2" description:"Automatically set up a v2 onion service to listen for inbound connections"`
|
||||
V2 bool `long:"v2" description:"DEPRECATED: Tor v2 onion services are obsolete and support will be removed in v0.21.0. Use v3 instead." hidden:"true"`
|
||||
V3 bool `long:"v3" description:"Automatically set up a v3 onion service to listen for inbound connections"`
|
||||
PrivateKeyPath string `long:"privatekeypath" description:"The path to the private key of the onion service being created"`
|
||||
EncryptKey bool `long:"encryptkey" description:"Encrypts the Tor private key file on disk"`
|
||||
|
||||
Reference in New Issue
Block a user