decl_module! macro: use 'frame_system' instead of system as default ident (#6500)

* Use frame_system as default ident.

* Remove unused 'frame_system' to 'system' renaming.

* Fix construct_runtime_ui tests.

* Rename system to frame_system in sudo/utility pallet test.

* Bump runtime impl_version.

* Update formatting.
This commit is contained in:
Shaopeng Wang
2020-07-08 11:06:21 +12:00
committed by GitHub
parent 36cf6e7dc4
commit a6702b7121
30 changed files with 57 additions and 57 deletions
+6 -6
View File
@@ -39,7 +39,7 @@
//! `Yes`**.
//!
//! ```
//! # use frame_system::{self as system, Trait};
//! # use frame_system::Trait;
//! frame_support::decl_module! {
//! pub struct Module<T: Trait> for enum Call where origin: T::Origin {
//! #[weight = 1000]
@@ -52,7 +52,7 @@
//! 2.1 Define weight and class, **in which case `PaysFee` would be `Yes`**.
//!
//! ```
//! # use frame_system::{self as system, Trait};
//! # use frame_system::Trait;
//! # use frame_support::weights::DispatchClass;
//! frame_support::decl_module! {
//! pub struct Module<T: Trait> for enum Call where origin: T::Origin {
@@ -66,7 +66,7 @@
//! 2.2 Define weight and `PaysFee`, **in which case `ClassifyDispatch` would be `Normal`**.
//!
//! ```
//! # use frame_system::{self as system, Trait};
//! # use frame_system::Trait;
//! # use frame_support::weights::Pays;
//! frame_support::decl_module! {
//! pub struct Module<T: Trait> for enum Call where origin: T::Origin {
@@ -80,7 +80,7 @@
//! 3. Define all 3 parameters.
//!
//! ```
//! # use frame_system::{self as system, Trait};
//! # use frame_system::Trait;
//! # use frame_support::weights::{DispatchClass, Pays};
//! frame_support::decl_module! {
//! pub struct Module<T: Trait> for enum Call where origin: T::Origin {
@@ -100,7 +100,7 @@
//! all 3 are static values, providing a raw tuple is easier.
//!
//! ```
//! # use frame_system::{self as system, Trait};
//! # use frame_system::Trait;
//! # use frame_support::weights::{DispatchClass, FunctionOf, Pays};
//! frame_support::decl_module! {
//! pub struct Module<T: Trait> for enum Call where origin: T::Origin {
@@ -589,7 +589,7 @@ pub trait WeightToFeePolynomial {
Self::polynomial().iter().fold(Self::Balance::saturated_from(0u32), |mut acc, args| {
let w = Self::Balance::saturated_from(*weight).saturating_pow(args.degree.into());
// The sum could get negative. Therefore we only sum with the accumulator.
// The sum could get negative. Therefore we only sum with the accumulator.
// The Perbill Mul implementation is non overflowing.
let frac = args.coeff_frac * w;
let integer = args.coeff_integer.saturating_mul(w);