mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
paras: dismiss pvf_checking_enabled configuration (#7138)
* paras: unconditionally precheck pvfs * Update integration tests * paras_registrar tests * runtime benchmark tests * fix bench * bypass prechecking in test node * adjust bench * ".git/.scripts/commands/bench/bench.sh" runtime polkadot runtime_parachains::paras * ".git/.scripts/commands/bench/bench.sh" runtime kusama runtime_parachains::paras * ".git/.scripts/commands/bench/bench.sh" runtime rococo runtime_parachains::paras * ".git/.scripts/commands/bench/bench.sh" runtime westend runtime_parachains::paras * use test helper * fix new test --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -988,6 +988,7 @@ mod benchmarking {
|
||||
use super::*;
|
||||
use frame_support::assert_ok;
|
||||
use frame_system::RawOrigin;
|
||||
use runtime_parachains::paras;
|
||||
use sp_runtime::traits::{Bounded, One};
|
||||
|
||||
use frame_benchmarking::{account, benchmarks, whitelisted_caller, BenchmarkError};
|
||||
@@ -1002,7 +1003,7 @@ mod benchmarking {
|
||||
assert_eq!(event, &system_event);
|
||||
}
|
||||
|
||||
fn register_a_parathread<T: Config>(i: u32) -> (ParaId, T::AccountId) {
|
||||
fn register_a_parathread<T: Config + paras::Config>(i: u32) -> (ParaId, T::AccountId) {
|
||||
let para = ParaId::from(i);
|
||||
let leaser: T::AccountId = account("leaser", i, 0);
|
||||
T::Currency::make_free_balance_be(&leaser, BalanceOf::<T>::max_value());
|
||||
@@ -1013,14 +1014,21 @@ mod benchmarking {
|
||||
leaser.clone(),
|
||||
para,
|
||||
worst_head_data,
|
||||
worst_validation_code
|
||||
worst_validation_code.clone(),
|
||||
));
|
||||
assert_ok!(paras::Pallet::<T>::add_trusted_validation_code(
|
||||
frame_system::Origin::<T>::Root.into(),
|
||||
worst_validation_code,
|
||||
));
|
||||
|
||||
T::Registrar::execute_pending_transitions();
|
||||
|
||||
(para, leaser)
|
||||
}
|
||||
|
||||
benchmarks! {
|
||||
where_clause { where T: paras::Config }
|
||||
|
||||
force_lease {
|
||||
// If there is an offset, we need to be on that block to be able to do lease things.
|
||||
frame_system::Pallet::<T>::set_block_number(T::LeaseOffset::get() + One::one());
|
||||
|
||||
Reference in New Issue
Block a user