mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 14:18:03 +00:00
Fix auction bench (#6747)
* Adjust command
* Move imports
* Chain-specific blocktime
* update lockfile for {"substrate"}
* cargo update -p sp-io
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix bench
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Export constants from node service
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Use constants in CLI
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Piotr Mikołajczyk <piomiko41@gmail.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
b13ba77a3b
commit
35a0d69af8
Generated
+205
-181
File diff suppressed because it is too large
Load Diff
@@ -649,6 +649,9 @@ pub fn run() -> Result<()> {
|
||||
#[cfg(feature = "try-runtime")]
|
||||
Some(Subcommand::TryRuntime(cmd)) => {
|
||||
use sc_executor::{sp_wasm_interface::ExtendedHostFunctions, NativeExecutionDispatch};
|
||||
use sc_service::TaskManager;
|
||||
use try_runtime_cli::block_building_info::timestamp_with_babe_info;
|
||||
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
let chain_spec = &runner.config().chain_spec;
|
||||
set_default_ss58_version(chain_spec);
|
||||
@@ -657,7 +660,6 @@ pub fn run() -> Result<()> {
|
||||
<E as NativeExecutionDispatch>::ExtendHostFunctions,
|
||||
>;
|
||||
|
||||
use sc_service::TaskManager;
|
||||
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
|
||||
let task_manager = TaskManager::new(runner.config().tokio_handle.clone(), *registry)
|
||||
.map_err(|e| Error::SubstrateService(sc_service::Error::Prometheus(e)))?;
|
||||
@@ -668,7 +670,8 @@ pub fn run() -> Result<()> {
|
||||
if chain_spec.is_kusama() {
|
||||
return runner.async_run(|_| {
|
||||
Ok((
|
||||
cmd.run::<service::kusama_runtime::Block, HostFunctionsOf<service::KusamaExecutorDispatch>>(
|
||||
cmd.run::<service::kusama_runtime::Block, HostFunctionsOf<service::KusamaExecutorDispatch>, _>(
|
||||
Some(timestamp_with_babe_info(service::kusama_runtime_constants::time::MILLISECS_PER_BLOCK))
|
||||
)
|
||||
.map_err(Error::SubstrateCli),
|
||||
task_manager,
|
||||
@@ -680,7 +683,8 @@ pub fn run() -> Result<()> {
|
||||
if chain_spec.is_westend() {
|
||||
return runner.async_run(|_| {
|
||||
Ok((
|
||||
cmd.run::<service::westend_runtime::Block, HostFunctionsOf<service::WestendExecutorDispatch>>(
|
||||
cmd.run::<service::westend_runtime::Block, HostFunctionsOf<service::WestendExecutorDispatch>, _>(
|
||||
Some(timestamp_with_babe_info(service::westend_runtime_constants::time::MILLISECS_PER_BLOCK))
|
||||
)
|
||||
.map_err(Error::SubstrateCli),
|
||||
task_manager,
|
||||
@@ -692,7 +696,8 @@ pub fn run() -> Result<()> {
|
||||
{
|
||||
return runner.async_run(|_| {
|
||||
Ok((
|
||||
cmd.run::<service::polkadot_runtime::Block, HostFunctionsOf<service::PolkadotExecutorDispatch>>(
|
||||
cmd.run::<service::polkadot_runtime::Block, HostFunctionsOf<service::PolkadotExecutorDispatch>, _>(
|
||||
Some(timestamp_with_babe_info(service::polkadot_runtime_constants::time::MILLISECS_PER_BLOCK))
|
||||
)
|
||||
.map_err(Error::SubstrateCli),
|
||||
task_manager,
|
||||
|
||||
@@ -121,13 +121,13 @@ pub use sp_runtime::{
|
||||
};
|
||||
|
||||
#[cfg(feature = "kusama-native")]
|
||||
pub use kusama_runtime;
|
||||
pub use {kusama_runtime, kusama_runtime_constants};
|
||||
#[cfg(feature = "polkadot-native")]
|
||||
pub use polkadot_runtime;
|
||||
pub use {polkadot_runtime, polkadot_runtime_constants};
|
||||
#[cfg(feature = "rococo-native")]
|
||||
pub use rococo_runtime;
|
||||
pub use {rococo_runtime, rococo_runtime_constants};
|
||||
#[cfg(feature = "westend-native")]
|
||||
pub use westend_runtime;
|
||||
pub use {westend_runtime, westend_runtime_constants};
|
||||
|
||||
/// The maximum number of active leaves we forward to the [`Overseer`] on startup.
|
||||
#[cfg(any(test, feature = "full-node"))]
|
||||
|
||||
@@ -1883,7 +1883,7 @@ mod benchmarking {
|
||||
pallet_babe::Pallet::<T>::on_initialize(duration + now + T::EndingPeriod::get());
|
||||
let authorities = pallet_babe::Pallet::<T>::authorities();
|
||||
let next_authorities = authorities.clone();
|
||||
pallet_babe::Pallet::<T>::enact_epoch_change(authorities, next_authorities);
|
||||
pallet_babe::Pallet::<T>::enact_epoch_change(authorities, next_authorities, None);
|
||||
}
|
||||
|
||||
}: {
|
||||
|
||||
Reference in New Issue
Block a user