mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
ChainSpec trait (#5185)
* ChainSpec trait * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * Added docs * Fixed build * Fixed build Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -83,9 +83,9 @@ impl ChainSpec {
|
||||
}
|
||||
}
|
||||
|
||||
fn load_spec(id: &str) -> Result<Option<chain_spec::ChainSpec>, String> {
|
||||
fn load_spec(id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
|
||||
Ok(match ChainSpec::from(id) {
|
||||
Some(spec) => Some(spec.load()?),
|
||||
None => None,
|
||||
Some(spec) => Box::new(spec.load()?),
|
||||
None => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(id))?),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user