mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
companion for try-runtime revamp (#6187)
* update to reflect latest try-runtime stuff
* update to latest version
* fix
* fix miner
* update
* update
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -1913,21 +1913,21 @@ sp_api::impl_runtime_apis! {
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade() -> (Weight, Weight) {
|
||||
fn on_runtime_upgrade(checks: bool) -> (Weight, Weight) {
|
||||
log::info!("try-runtime::on_runtime_upgrade kusama.");
|
||||
let weight = Executive::try_runtime_upgrade().unwrap();
|
||||
let weight = Executive::try_runtime_upgrade(checks).unwrap();
|
||||
(weight, BlockWeights::get().max_block)
|
||||
}
|
||||
|
||||
fn execute_block(block: Block, state_root_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight {
|
||||
log::info!(
|
||||
target: "runtime::kusama", "try-runtime: executing block #{} ({:?}) / root checks: {:?} / sanity-checks: {:?}",
|
||||
block.header.number,
|
||||
block.header.hash(),
|
||||
state_root_check,
|
||||
select,
|
||||
);
|
||||
Executive::try_execute_block(block, state_root_check, select).expect("try_execute_block failed")
|
||||
fn execute_block(
|
||||
block: Block,
|
||||
state_root_check: bool,
|
||||
signature_check: bool,
|
||||
select: frame_try_runtime::TryStateSelect,
|
||||
) -> Weight {
|
||||
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
|
||||
// have a backtrace here.
|
||||
Executive::try_execute_block(block, state_root_check, signature_check, select).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2233,6 +2233,6 @@ mod remote_tests {
|
||||
.build()
|
||||
.await
|
||||
.unwrap();
|
||||
ext.execute_with(|| Runtime::on_runtime_upgrade());
|
||||
ext.execute_with(|| Runtime::on_runtime_upgrade(true));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user