1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00

Add version command line argument

This commit is contained in:
Otto Sabart 2021-11-07 21:06:52 +01:00
parent 2d09854f9d
commit 6e4dd1575b
No known key found for this signature in database
GPG Key ID: 823BAE99F8BE1E3C
2 changed files with 9 additions and 0 deletions

View File

@ -108,6 +108,10 @@ doc = "Exit after the initial sync is over (don't start Electrum server)."
name = "cache_merkle_proofs"
doc = "Cache merkle proofs on subscription (if disabled, they are computed on demand)."
[[switch]]
name = "version"
doc = "Print out the program version."
[[param]]
name = "index_lookup_limit"
type = "usize"

View File

@ -308,6 +308,11 @@ impl Config {
std::process::exit(1);
}
if config.version {
println!("v{}", ELECTRS_VERSION);
std::process::exit(0);
}
let config = Config {
network: config.network,
db_path: config.db_dir,