mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 01:43:29 +01:00
deprecate unused config option timestamp
(#1052)
This commit is contained in:
parent
1b0bb23fab
commit
831ab0a525
@ -146,7 +146,6 @@ pub struct Config {
|
||||
pub disable_electrum_rpc: bool,
|
||||
pub server_banner: String,
|
||||
pub signet_magic: Magic,
|
||||
pub args: Vec<String>,
|
||||
}
|
||||
|
||||
pub struct SensitiveAuth(pub Auth);
|
||||
@ -195,7 +194,7 @@ impl Config {
|
||||
pub fn from_args() -> Config {
|
||||
use internal::ResultExt;
|
||||
|
||||
let (mut config, args) =
|
||||
let (mut config, _args) =
|
||||
internal::Config::including_optional_config_files(default_config_files())
|
||||
.unwrap_or_exit();
|
||||
|
||||
@ -290,6 +289,25 @@ impl Config {
|
||||
unsupported => unsupported_network(unsupported),
|
||||
}
|
||||
|
||||
let mut deprecated_options_used = false;
|
||||
|
||||
if config.timestamp {
|
||||
eprintln!(
|
||||
"Error: `timestamp` is deprecated, timestamps on logs is (and was) always \
|
||||
enabled, please remove this option."
|
||||
);
|
||||
deprecated_options_used = true;
|
||||
}
|
||||
|
||||
if config.verbose > 0 {
|
||||
eprintln!("Error: please use `log_filters` to set logging verbosity",);
|
||||
deprecated_options_used = true;
|
||||
}
|
||||
|
||||
if deprecated_options_used {
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
let daemon_dir = &config.daemon_dir;
|
||||
let daemon_auth = SensitiveAuth(match (config.auth, config.cookie_file) {
|
||||
(None, None) => Auth::CookieFile(daemon_dir.join(".cookie")),
|
||||
@ -308,10 +326,6 @@ impl Config {
|
||||
}
|
||||
});
|
||||
|
||||
if config.verbose > 0 {
|
||||
eprintln!("Error: please use `log_filters` to set logging verbosity",);
|
||||
std::process::exit(1);
|
||||
}
|
||||
let log_filters = config.log_filters;
|
||||
|
||||
let index_lookup_limit = match config.index_lookup_limit {
|
||||
@ -354,7 +368,6 @@ impl Config {
|
||||
disable_electrum_rpc: config.disable_electrum_rpc,
|
||||
server_banner: config.server_banner,
|
||||
signet_magic: magic,
|
||||
args: args.map(|a| a.into_string().unwrap()).collect(),
|
||||
};
|
||||
eprintln!(
|
||||
"Starting electrs {} on {} {} with {:?}",
|
||||
|
Loading…
Reference in New Issue
Block a user