mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-28 13:52:55 +02:00
multi: log warnings if deprecated config options are used
This commit adds warning logs if the user uses deprecated config options, paving the way for future removal.
This commit is contained in:
@@ -24,9 +24,15 @@ func TestConfigToFlatMap(t *testing.T) {
|
||||
cfg.DB.Etcd.Pass = testPassword
|
||||
cfg.DB.Postgres.Dsn = testPassword
|
||||
|
||||
result, err := configToFlatMap(cfg)
|
||||
// Set a deprecated field.
|
||||
cfg.Bitcoin.Active = 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")
|
||||
|
||||
// Pick a couple of random values to check.
|
||||
require.Equal(t, DefaultLndDir, result["lnddir"])
|
||||
require.Equal(
|
||||
|
Reference in New Issue
Block a user