config: add sanity check to prevent non-negative worker counts
This commit is contained in:
3 files changed
+129
No files matched your search
@@ -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