From f413ff5e46229d76365991e3f167166939a0f5bc Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 6 Oct 2021 01:58:33 -0700 Subject: [PATCH] Revert "Revert "Replace max_block with Weight::MAX"" This reverts commit 235aef0d2f0faad62550c0695d589dd0e865befc. --- runtime/parachains/src/configuration.rs | 12 ++++++------ runtime/parachains/src/paras.rs | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/runtime/parachains/src/configuration.rs b/runtime/parachains/src/configuration.rs index 0a9a9391fb35..3a58ddfdc8f5 100644 --- a/runtime/parachains/src/configuration.rs +++ b/runtime/parachains/src/configuration.rs @@ -280,22 +280,22 @@ pub trait WeightInfo { pub struct TestWeightInfo; impl WeightInfo for TestWeightInfo { fn set_config_with_block_number() -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn set_config_with_u32() -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn set_config_with_option_u32() -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn set_config_with_weight() -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn set_config_with_balance() -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn set_hrmp_open_request_ttl() -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } } diff --git a/runtime/parachains/src/paras.rs b/runtime/parachains/src/paras.rs index 7175bdfb3467..4582e3e99c44 100644 --- a/runtime/parachains/src/paras.rs +++ b/runtime/parachains/src/paras.rs @@ -281,19 +281,19 @@ pub trait WeightInfo { pub struct TestWeightInfo; impl WeightInfo for TestWeightInfo { fn force_set_current_code(_c: u32) -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn force_set_current_head(_s: u32) -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn force_schedule_code_upgrade(_c: u32) -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn force_note_new_head(_s: u32) -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } fn force_queue_action() -> Weight { - frame_system::limits::BlockWeights::default().max_block + Weight::MAX } }