mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 09:54:09 +01:00
Add version command line argument
This commit is contained in:
parent
2d09854f9d
commit
6e4dd1575b
@ -108,6 +108,10 @@ doc = "Exit after the initial sync is over (don't start Electrum server)."
|
|||||||
name = "cache_merkle_proofs"
|
name = "cache_merkle_proofs"
|
||||||
doc = "Cache merkle proofs on subscription (if disabled, they are computed on demand)."
|
doc = "Cache merkle proofs on subscription (if disabled, they are computed on demand)."
|
||||||
|
|
||||||
|
[[switch]]
|
||||||
|
name = "version"
|
||||||
|
doc = "Print out the program version."
|
||||||
|
|
||||||
[[param]]
|
[[param]]
|
||||||
name = "index_lookup_limit"
|
name = "index_lookup_limit"
|
||||||
type = "usize"
|
type = "usize"
|
||||||
|
@ -308,6 +308,11 @@ impl Config {
|
|||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.version {
|
||||||
|
println!("v{}", ELECTRS_VERSION);
|
||||||
|
std::process::exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
let config = Config {
|
let config = Config {
|
||||||
network: config.network,
|
network: config.network,
|
||||||
db_path: config.db_dir,
|
db_path: config.db_dir,
|
||||||
|
Loading…
Reference in New Issue
Block a user