allow no config
This commit is contained in:
parent
e89126cff8
commit
51a9beaf6f
@ -123,6 +123,9 @@ fn main() -> anyhow::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let top_config = if let Some(top_config_path) = cli_config.config.clone() {
|
let top_config = if let Some(top_config_path) = cli_config.config.clone() {
|
||||||
|
if top_config_path.is_empty() {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
let top_config_path = Path::new(&top_config_path)
|
let top_config_path = Path::new(&top_config_path)
|
||||||
.canonicalize()
|
.canonicalize()
|
||||||
.context(format!("checking for config at {}", top_config_path))?;
|
.context(format!("checking for config at {}", top_config_path))?;
|
||||||
@ -152,6 +155,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Some(top_config)
|
Some(top_config)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
@ -201,6 +205,8 @@ fn main() -> anyhow::Result<()> {
|
|||||||
// TODO: i think these max at 15 characters
|
// TODO: i think these max at 15 characters
|
||||||
format!("web3-{}-{}", chain_id, worker_id)
|
format!("web3-{}-{}", chain_id, worker_id)
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
rt_builder.enable_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
// start tokio's async runtime
|
// start tokio's async runtime
|
||||||
|
Loading…
Reference in New Issue
Block a user