mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 01:41:09 +00:00
companion try-state (#5907)
* bunch of changes for now
* companion for sanity-checks
* Fix
* remove bridges
* better logging
* revert spec change
* fmt
* fix
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -1587,13 +1587,21 @@ sp_api::impl_runtime_apis! {
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade() -> (frame_support::weights::Weight, frame_support::weights::Weight) {
|
||||
fn on_runtime_upgrade() -> (Weight, Weight) {
|
||||
log::info!("try-runtime::on_runtime_upgrade westend.");
|
||||
let weight = Executive::try_runtime_upgrade().unwrap();
|
||||
(weight, BlockWeights::get().max_block)
|
||||
}
|
||||
fn execute_block_no_check(block: Block) -> frame_support::weights::Weight {
|
||||
Executive::execute_block_no_check(block)
|
||||
|
||||
fn execute_block(block: Block, state_root_check: bool, select: frame_try_runtime::TryStateSelect) -> Weight {
|
||||
log::info!(
|
||||
target: "runtime::westend", "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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user