mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 20:57:59 +00:00
Move config path generation into the service config for reusability (#3978)
* Move config path generation into the service config for reusability * Make NoCostum Default and fix tests * Apply suggestions from code review Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com> * remove function not used anymore * Make path into an option * remove database_path function and call it directly * remove helper functions, use consts
This commit is contained in:
committed by
Gavin Wood
parent
8fe64173e8
commit
2ff04d332d
@@ -39,7 +39,7 @@ fn start_inner(wasm_ext: wasm_ext::ffi::Transport) -> Result<Client, Box<dyn std
|
||||
let config = {
|
||||
let wasm_ext = wasm_ext::ExtTransport::new(wasm_ext);
|
||||
let chain_spec = ChainSpec::FlamingFir.load().map_err(|e| format!("{:?}", e))?;
|
||||
let mut config = Configuration::<(), _, _>::default_with_spec(chain_spec);
|
||||
let mut config = Configuration::<(), _, _>::default_with_spec_and_base_path(chain_spec, None);
|
||||
config.network.transport = network::config::TransportConfig::Normal {
|
||||
wasm_external_transport: Some(wasm_ext.clone()),
|
||||
enable_mdns: false,
|
||||
|
||||
@@ -131,7 +131,7 @@ pub fn run<I, T, E>(args: I, exit: E, version: substrate_cli::VersionInfo) -> er
|
||||
),
|
||||
}
|
||||
}),
|
||||
ParseAndPrepare::BuildSpec(cmd) => cmd.run(load_spec),
|
||||
ParseAndPrepare::BuildSpec(cmd) => cmd.run::<NoCustom, _, _, _>(load_spec),
|
||||
ParseAndPrepare::ExportBlocks(cmd) => cmd.run_with_builder(|config: Config<_, _>|
|
||||
Ok(new_full_start!(config).0), load_spec, exit),
|
||||
ParseAndPrepare::ImportBlocks(cmd) => cmd.run_with_builder(|config: Config<_, _>|
|
||||
|
||||
Reference in New Issue
Block a user