mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 11:01:01 +00:00
6007549589
* change dir names * cargo toml updates * fix crate imports for build * change chain spec names and PR review rule * update cli to accept asset-hub * find/replace benchmark commands * integration tests * bridges docs * more integration tests * AuraId * other statemint tidying * rename statemint mod * chain spec mod * rename e2e test dirs * one more Runtime::Statemine * benchmark westmint * rename chain spec name and id * rename chain spec files * more tidying in scripts/docs/tests * rename old dir if exists * Force people to manually do the move. (Safer as there could be additional considerations with their setup) * review touchups * more renaming * Update polkadot-parachain/src/command.rs Co-authored-by: Bastian Köcher <git@kchr.de> * better error message * do not break on-chain spec_name * log info message that path has been renamed * better penpal docs --------- Co-authored-by: gilescope <gilescope@gmail.com> Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: parity-processbot <>
54 lines
1.6 KiB
Rust
54 lines
1.6 KiB
Rust
// This file is part of Substrate.
|
|
|
|
// Copyright (C) 2022 Parity Technologies (UK) Ltd.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
pub mod constants {
|
|
use frame_support::{
|
|
parameter_types,
|
|
weights::{constants, Weight},
|
|
};
|
|
|
|
parameter_types! {
|
|
/// Executing a NO-OP `System::remarks` Extrinsic.
|
|
pub const ExtrinsicBaseWeight: Weight =
|
|
Weight::from_parts(constants::WEIGHT_REF_TIME_PER_NANOS.saturating_mul(125_000), 0);
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod test_weights {
|
|
use frame_support::weights::constants;
|
|
|
|
/// Checks that the weight exists and is sane.
|
|
// NOTE: If this test fails but you are sure that the generated values are fine,
|
|
// you can delete it.
|
|
#[test]
|
|
fn sane() {
|
|
let w = super::constants::ExtrinsicBaseWeight::get();
|
|
|
|
// At least 10 µs.
|
|
assert!(
|
|
w.ref_time() >= 10u64 * constants::WEIGHT_REF_TIME_PER_MICROS,
|
|
"Weight should be at least 10 µs."
|
|
);
|
|
// At most 1 ms.
|
|
assert!(
|
|
w.ref_time() <= constants::WEIGHT_REF_TIME_PER_MILLIS,
|
|
"Weight should be at most 1 ms."
|
|
);
|
|
}
|
|
}
|
|
}
|