From e5bb5d432a9d143bd1074f8c2fc73abcd3856a80 Mon Sep 17 00:00:00 2001 From: Wilfried Kopp Date: Wed, 5 Oct 2022 12:20:47 +0200 Subject: [PATCH] fmt --- parachain-template/runtime/src/lib.rs | 3 ++- parachains/common/src/lib.rs | 3 ++- parachains/runtimes/starters/seedling/src/lib.rs | 3 ++- parachains/runtimes/starters/shell/src/lib.rs | 3 ++- parachains/runtimes/testing/penpal/src/lib.rs | 3 ++- parachains/runtimes/testing/rococo-parachain/src/lib.rs | 3 ++- test/runtime/src/lib.rs | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/parachain-template/runtime/src/lib.rs b/parachain-template/runtime/src/lib.rs index 3ad6a055e82..a52b4982636 100644 --- a/parachain-template/runtime/src/lib.rs +++ b/parachain-template/runtime/src/lib.rs @@ -217,7 +217,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 0.5 of a second of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_div(2) +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); /// The version information used to identify this runtime when compiled natively. diff --git a/parachains/common/src/lib.rs b/parachains/common/src/lib.rs index 1ad4dc2f85c..c192d6e2a7e 100644 --- a/parachains/common/src/lib.rs +++ b/parachains/common/src/lib.rs @@ -92,7 +92,8 @@ mod constants { pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 0.5 seconds of compute with a 6 second average block time. - pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_div(2) + pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) .set_proof_size(polkadot_primitives::v2::MAX_POV_SIZE as u64); } diff --git a/parachains/runtimes/starters/seedling/src/lib.rs b/parachains/runtimes/starters/seedling/src/lib.rs index 84327c4dc7d..67cc9dede21 100644 --- a/parachains/runtimes/starters/seedling/src/lib.rs +++ b/parachains/runtimes/starters/seedling/src/lib.rs @@ -85,7 +85,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for .5 seconds of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_div(2) +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { diff --git a/parachains/runtimes/starters/shell/src/lib.rs b/parachains/runtimes/starters/shell/src/lib.rs index 4eefd1befaa..2d91a0c015b 100644 --- a/parachains/runtimes/starters/shell/src/lib.rs +++ b/parachains/runtimes/starters/shell/src/lib.rs @@ -92,7 +92,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for .5 seconds of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_div(2) +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { diff --git a/parachains/runtimes/testing/penpal/src/lib.rs b/parachains/runtimes/testing/penpal/src/lib.rs index 0a18f70f0f4..dddb71773f6 100644 --- a/parachains/runtimes/testing/penpal/src/lib.rs +++ b/parachains/runtimes/testing/penpal/src/lib.rs @@ -230,7 +230,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(5); const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for 0.5 of a second of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_div(2) +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); /// The version information used to identify this runtime when compiled natively. diff --git a/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/parachains/runtimes/testing/rococo-parachain/src/lib.rs index ec6a08b0b42..21d784aae65 100644 --- a/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -134,7 +134,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for .5 seconds of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_div(2) +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! { diff --git a/test/runtime/src/lib.rs b/test/runtime/src/lib.rs index 4ac173efef7..786590b8b91 100644 --- a/test/runtime/src/lib.rs +++ b/test/runtime/src/lib.rs @@ -140,7 +140,8 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); /// by Operational extrinsics. const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); /// We allow for .5 seconds of compute with a 12 second average block time. -const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_div(2) +const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND + .saturating_div(2) .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64); parameter_types! {