mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-12-19 20:25:51 +01:00
config: add sanity check to prevent non-negative worker counts
This commit is contained in:
@@ -990,6 +990,12 @@ func loadConfig() (*config, error) {
|
||||
"minbackoff")
|
||||
}
|
||||
|
||||
// Assert that all worker pools will have a positive number of
|
||||
// workers, otherwise the pools will rendered useless.
|
||||
if err := cfg.Workers.Validate(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Finally, ensure that the user's color is correctly formatted,
|
||||
// otherwise the server will not be able to start after the unlocking
|
||||
// the wallet.
|
||||
|
||||
Reference in New Issue
Block a user