mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Companion PR for 'Make choosing an executor an explicit part of service construction' (#9525) (#3615)
* Companion PR * Update a few files * Run cargo fmt * Do better at renaming things * More renamings * More fixes * oops * Fix simnet problems * fix compilation * Update substrate Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -376,23 +376,29 @@ pub fn run() -> Result<()> {
|
||||
#[cfg(feature = "kusama-native")]
|
||||
if chain_spec.is_kusama() {
|
||||
return Ok(runner.sync_run(|config| {
|
||||
cmd.run::<service::kusama_runtime::Block, service::KusamaExecutor>(config)
|
||||
.map_err(|e| Error::SubstrateCli(e))
|
||||
cmd.run::<service::kusama_runtime::Block, service::KusamaExecutorDispatch>(
|
||||
config,
|
||||
)
|
||||
.map_err(|e| Error::SubstrateCli(e))
|
||||
})?)
|
||||
}
|
||||
|
||||
#[cfg(feature = "westend-native")]
|
||||
if chain_spec.is_westend() {
|
||||
return Ok(runner.sync_run(|config| {
|
||||
cmd.run::<service::westend_runtime::Block, service::WestendExecutor>(config)
|
||||
.map_err(|e| Error::SubstrateCli(e))
|
||||
cmd.run::<service::westend_runtime::Block, service::WestendExecutorDispatch>(
|
||||
config,
|
||||
)
|
||||
.map_err(|e| Error::SubstrateCli(e))
|
||||
})?)
|
||||
}
|
||||
|
||||
// else we assume it is polkadot.
|
||||
Ok(runner.sync_run(|config| {
|
||||
cmd.run::<service::polkadot_runtime::Block, service::PolkadotExecutor>(config)
|
||||
.map_err(|e| Error::SubstrateCli(e))
|
||||
cmd.run::<service::polkadot_runtime::Block, service::PolkadotExecutorDispatch>(
|
||||
config,
|
||||
)
|
||||
.map_err(|e| Error::SubstrateCli(e))
|
||||
})?)
|
||||
},
|
||||
Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?),
|
||||
|
||||
Reference in New Issue
Block a user