mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 06:08:01 +00:00
Integrate try-runtime into cumulus (#793)
* almost integrate * revert branch changes * remove extra deps * some review comments' * Fix a bunch of stuff * Update parachain-template/node/Cargo.toml Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Fix * Fix * fix benchmark * fmt * Remove wrong bench test Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
This commit is contained in:
@@ -732,6 +732,18 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
impl frame_try_runtime::TryRuntime<Block> for Runtime {
|
||||
fn on_runtime_upgrade() -> (Weight, Weight) {
|
||||
log::info!("try-runtime::on_runtime_upgrade parachain-template.");
|
||||
let weight = Executive::try_runtime_upgrade().unwrap();
|
||||
(weight, RuntimeBlockWeights::get().max_block)
|
||||
}
|
||||
|
||||
fn execute_block_no_check(block: Block) -> Weight {
|
||||
Executive::execute_block_no_check(block)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
impl frame_benchmarking::Benchmark<Block> for Runtime {
|
||||
@@ -788,7 +800,6 @@ impl_runtime_apis! {
|
||||
add_benchmark!(params, batches, pallet_session, SessionBench::<Runtime>);
|
||||
add_benchmark!(params, batches, pallet_timestamp, Timestamp);
|
||||
add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection);
|
||||
add_benchmark!(params, batches, pallet_session, Session);
|
||||
|
||||
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
|
||||
Ok(batches)
|
||||
|
||||
Reference in New Issue
Block a user