File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,11 +102,15 @@ impl SubstrateCli for PolkadotCli {
102102 "cumulus-test-parachain-collator"
103103 }
104104
105- fn load_spec ( & self , _id : & str ) -> std:: result:: Result < Box < dyn sc_service:: ChainSpec > , String > {
106- polkadot_service:: PolkadotChainSpec :: from_json_bytes (
107- & include_bytes ! ( "../res/polkadot_chainspec.json" ) [ ..] ,
108- )
109- . map ( |r| Box :: new ( r) as Box < _ > )
105+ fn load_spec ( & self , id : & str ) -> std:: result:: Result < Box < dyn sc_service:: ChainSpec > , String > {
106+ Ok ( match id {
107+ "" | "local" | "dev" => Box :: new ( polkadot_service:: PolkadotChainSpec :: from_json_bytes (
108+ & include_bytes ! ( "../res/polkadot_chainspec.json" ) [ ..] ,
109+ ) ?) ,
110+ path => Box :: new ( chain_spec:: ChainSpec :: from_json_file (
111+ std:: path:: PathBuf :: from ( path) ,
112+ ) ?) ,
113+ } )
110114 }
111115}
112116
You can’t perform that action at this time.
0 commit comments