Allow to set concurrency in Esplora config and optionally pass it in repl

This commit is contained in:
Riccardo Casatta
2020-11-17 09:58:29 +01:00
parent 4c59809f8e
commit c9079a7292
4 changed files with 34 additions and 16 deletions

View File

@@ -95,6 +95,9 @@ fn main() {
let config = match matches.value_of("esplora") {
Some(base_url) => AnyBlockchainConfig::Esplora(EsploraBlockchainConfig {
base_url: base_url.to_string(),
concurrency: matches
.value_of("esplora_concurrency")
.and_then(|v| v.parse::<u8>().ok()),
}),
None => AnyBlockchainConfig::Electrum(ElectrumBlockchainConfig {
url: matches.value_of("server").unwrap().to_string(),