Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Chain-specific blocktime
  • Loading branch information
pmikolajczyk41 committed Feb 13, 2023
commit d160c40aacffa10fb6a444a3c73c78508f8ecc3f
8 changes: 3 additions & 5 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,16 +664,14 @@ pub fn run() -> Result<()> {
let task_manager = TaskManager::new(runner.config().tokio_handle.clone(), *registry)
.map_err(|e| Error::SubstrateService(sc_service::Error::Prometheus(e)))?;

let info_provider = timestamp_with_babe_info(6000);

ensure_dev(chain_spec).map_err(Error::Other)?;

#[cfg(feature = "kusama-native")]
if chain_spec.is_kusama() {
return runner.async_run(|_| {
Ok((
cmd.run::<service::kusama_runtime::Block, HostFunctionsOf<service::KusamaExecutorDispatch>, _>(
Some(info_provider)
Some(timestamp_with_babe_info(service::kusama_runtime::MILLISECS_PER_BLOCK))
)
.map_err(Error::SubstrateCli),
task_manager,
Expand All @@ -686,7 +684,7 @@ pub fn run() -> Result<()> {
return runner.async_run(|_| {
Ok((
cmd.run::<service::westend_runtime::Block, HostFunctionsOf<service::WestendExecutorDispatch>, _>(
Some(info_provider)
Some(timestamp_with_babe_info(service::westend_runtime::MILLISECS_PER_BLOCK))
)
.map_err(Error::SubstrateCli),
task_manager,
Expand All @@ -699,7 +697,7 @@ pub fn run() -> Result<()> {
return runner.async_run(|_| {
Ok((
cmd.run::<service::polkadot_runtime::Block, HostFunctionsOf<service::PolkadotExecutorDispatch>, _>(
Some(info_provider)
Some(timestamp_with_babe_info(service::polkadot_runtime::MILLISECS_PER_BLOCK))
)
.map_err(Error::SubstrateCli),
task_manager,
Expand Down