Companion for paritytech/substrate#12868 (#1970)

* Replace WEIGHT_PER_* with WEIGHT_REF_TIME_PER_*

* Fixes

* Fixes

* update lockfile for {"substrate", "polkadot"}

Co-authored-by: parity-processbot <>
This commit is contained in:
Keith Yeung
2022-12-09 02:36:30 +09:00
committed by GitHub
parent 97bc16ba7c
commit f3847ead3c
49 changed files with 505 additions and 480 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ use codec::{Decode, DecodeLimit, Encode};
use cumulus_primitives_core::{relay_chain::BlockNumber as RelayBlockNumber, DmpMessageHandler};
use frame_support::{
traits::EnsureOrigin,
weights::{constants::WEIGHT_PER_MILLIS, Weight},
weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, Weight},
};
pub use pallet::*;
use scale_info::TypeInfo;
@@ -52,8 +52,8 @@ impl Default for ConfigData {
fn default() -> Self {
Self {
max_individual: Weight::from_parts(
10u64 * WEIGHT_PER_MILLIS.ref_time(), // 10 ms of execution time maximum by default
DEFAULT_POV_SIZE, // 64 KB of proof size by default
10u64 * WEIGHT_REF_TIME_PER_MILLIS, // 10 ms of execution time maximum by default
DEFAULT_POV_SIZE, // 64 KB of proof size by default
),
}
}
+2 -2
View File
@@ -20,7 +20,7 @@ use crate::{Config, Pallet, Store, DEFAULT_POV_SIZE};
use frame_support::{
pallet_prelude::*,
traits::StorageVersion,
weights::{constants::WEIGHT_PER_MILLIS, Weight},
weights::{constants::WEIGHT_REF_TIME_PER_MILLIS, Weight},
};
use xcm::latest::Weight as XcmWeight;
@@ -51,7 +51,7 @@ mod v0 {
impl Default for ConfigData {
fn default() -> Self {
ConfigData { max_individual: 10u64 * WEIGHT_PER_MILLIS.ref_time() }
ConfigData { max_individual: 10u64 * WEIGHT_REF_TIME_PER_MILLIS }
}
}
}