try-runtime::fast-forward (#12896)

* try-runtime::fast-forward

* Revert un`pub`ing command's fields

* Handle storage change failure

* Adjust Substrate node

* Feature-gated imports

* doc link

* Feature-gated imports in node-template

* Move trait, blanket implementation and auxiliary functions to a new module

* Distinguish between plain babe+timestamp and substrate enhanced info

* Remove uncles inherents

* Missing argument

* Add doc comment about `blocktime_millis`

* Add licenses
This commit is contained in:
Piotr Mikołajczyk
2023-02-17 13:21:58 +01:00
committed by GitHub
parent 64bff4529d
commit 3595d87182
8 changed files with 473 additions and 4 deletions
@@ -10,6 +10,9 @@ use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli};
use sc_service::PartialComponents;
use sp_keyring::Sr25519Keyring;
#[cfg(feature = "try-runtime")]
use try_runtime_cli::block_building_info::timestamp_with_aura_info;
impl SubstrateCli for Cli {
fn impl_name() -> String {
"Substrate Node".into()
@@ -184,11 +187,13 @@ pub fn run() -> sc_cli::Result<()> {
let task_manager =
sc_service::TaskManager::new(config.tokio_handle.clone(), registry)
.map_err(|e| sc_cli::Error::Service(sc_service::Error::Prometheus(e)))?;
let info_provider = timestamp_with_aura_info(6000);
Ok((
cmd.run::<Block, ExtendedHostFunctions<
sp_io::SubstrateHostFunctions,
<ExecutorDispatch as NativeExecutionDispatch>::ExtendHostFunctions,
>>(),
>, _>(Some(info_provider)),
task_manager,
))
})