difftreelog
Move coeff to common
in: master
4 files changed
runtime/common/src/constants.rsdiffbeforeafterboth1use sp_runtime::Perbill;2use frame_support::{3 parameter_types,4 weights::{Weight, constants::WEIGHT_PER_SECOND},5};6use crate::types::BlockNumber;78pub const MILLISECS_PER_BLOCK: u64 = 12000;910pub const SLOT_DURATION: u64 = MILLISECS_PER_BLOCK;1112// These time units are defined in number of blocks.13pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);14pub const HOURS: BlockNumber = MINUTES * 60;15pub const DAYS: BlockNumber = HOURS * 24;1617/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.18/// This is used to limit the maximal weight of a single extrinsic.19pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);20/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used21/// by Operational extrinsics.22pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);23/// We allow for 2 seconds of compute with a 6 second average block time.24pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND / 2;2526parameter_types! {27 pub const DefaultSponsoringRateLimit: BlockNumber = 1 * DAYS;28}runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -467,7 +467,7 @@
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
smallvec!(WeightToFeeCoefficient {
// Targeting 0.1 Unique per NFT transfer
- coeff_integer: 142_688_000u32.into(),
+ coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
coeff_frac: Perbill::zero(),
negative: false,
degree: 1,
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -467,7 +467,7 @@
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
smallvec!(WeightToFeeCoefficient {
// Targeting 0.1 Unique per NFT transfer
- coeff_integer: 142_688_000u32.into(),
+ coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
coeff_frac: Perbill::zero(),
negative: false,
degree: 1,
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -466,7 +466,7 @@
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
smallvec!(WeightToFeeCoefficient {
// Targeting 0.1 Unique per NFT transfer
- coeff_integer: 142_688_000u32.into(),
+ coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
coeff_frac: Perbill::zero(),
negative: false,
degree: 1,