Refactoring Checkpoint: (WIP)
This commit is contained in:
@@ -3,4 +3,4 @@ These runtimes are used for benchmarking the `set_code` intrinsic.
|
||||
**Don't use them in production environments!**
|
||||
|
||||
To update the just copy the new runtime from
|
||||
`target/release/wbuild/kitchensink-runtime/kitchensink_runtime.compact.compressed.wasm` to here.
|
||||
`target/release/wbuild/pez-kitchensink-runtime/pez_kitchensink_runtime.compact.compressed.wasm` to here.
|
||||
|
||||
@@ -29,9 +29,9 @@ pub struct Pallet<T: Config>(System<T>);
|
||||
pub trait Config: pezframe_system::Config {
|
||||
/// Adds ability to the Runtime to test against their sample code.
|
||||
///
|
||||
/// Default is `../res/kitchensink_runtime.compact.compressed.wasm`.
|
||||
/// Default is `../res/pez_kitchensink_runtime.compact.compressed.wasm`.
|
||||
fn prepare_set_code_data() -> Vec<u8> {
|
||||
include_bytes!("../res/kitchensink_runtime.compact.compressed.wasm").to_vec()
|
||||
include_bytes!("../res/pez_kitchensink_runtime.compact.compressed.wasm").to_vec()
|
||||
}
|
||||
|
||||
/// Adds ability to the Runtime to prepare/initialize before running benchmark `set_code`.
|
||||
|
||||
@@ -785,20 +785,20 @@ pub mod pallet {
|
||||
|
||||
/// Kill all storage items with a key that starts with the given prefix.
|
||||
///
|
||||
/// **NOTE:** We rely on the Root origin to provide us the number of subkeys under
|
||||
/// **NOTE:** We rely on the Root origin to provide us the number of pez_subkeys under
|
||||
/// the prefix we are removing to accurately calculate the weight of this function.
|
||||
#[pallet::call_index(6)]
|
||||
#[pallet::weight((
|
||||
T::SystemWeightInfo::kill_prefix(subkeys.saturating_add(1)),
|
||||
T::SystemWeightInfo::kill_prefix(pez_subkeys.saturating_add(1)),
|
||||
DispatchClass::Operational,
|
||||
))]
|
||||
pub fn kill_prefix(
|
||||
origin: OriginFor<T>,
|
||||
prefix: Key,
|
||||
subkeys: u32,
|
||||
pez_subkeys: u32,
|
||||
) -> DispatchResultWithPostInfo {
|
||||
ensure_root(origin)?;
|
||||
let _ = storage::unhashed::clear_prefix(&prefix, Some(subkeys), None);
|
||||
let _ = storage::unhashed::clear_prefix(&prefix, Some(pez_subkeys), None);
|
||||
Ok(().into())
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
// benchmark
|
||||
// pallet
|
||||
// --extrinsic=*
|
||||
// --runtime=target/production/wbuild/kitchensink-runtime/kitchensink_runtime.wasm
|
||||
// --runtime=target/production/wbuild/pez-kitchensink-runtime/pez_kitchensink_runtime.wasm
|
||||
// --pallet=pezframe_system
|
||||
// --header=/__w/pezkuwi-sdk/pezkuwi-sdk/bizinikiwi/HEADER-APACHE2
|
||||
// --output=/__w/pezkuwi-sdk/pezkuwi-sdk/bizinikiwi/pezframe/system/src/weights.rs
|
||||
|
||||
Reference in New Issue
Block a user