From a0685d6864971d4a6599878cb5b73cf04db04c72 Mon Sep 17 00:00:00 2001 From: Mudit Gupta Date: Thu, 29 Apr 2021 15:35:31 +0530 Subject: [PATCH 1/2] Merge pull request #992 from PolymathNetwork/election-block-weight Fix weight for submitting election results --- Cargo.toml | 2 +- pallets/runtime/develop/src/runtime.rs | 2 +- pallets/runtime/itn/src/runtime.rs | 2 +- pallets/runtime/testnet/src/runtime.rs | 2 +- pallets/staking/src/lib.rs | 14 ++------------ 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 406fdf13dd..48af5d4774 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polymesh" -version = "3.0.1" +version = "3.0.2" authors = ["Polymath"] build = "build.rs" edition = "2018" diff --git a/pallets/runtime/develop/src/runtime.rs b/pallets/runtime/develop/src/runtime.rs index bfdd4b7203..437fcd0693 100644 --- a/pallets/runtime/develop/src/runtime.rs +++ b/pallets/runtime/develop/src/runtime.rs @@ -57,7 +57,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 2018, + spec_version: 2019, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 7, diff --git a/pallets/runtime/itn/src/runtime.rs b/pallets/runtime/itn/src/runtime.rs index f99d8e41af..12fa1c5337 100644 --- a/pallets/runtime/itn/src/runtime.rs +++ b/pallets/runtime/itn/src/runtime.rs @@ -55,7 +55,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 2018, + spec_version: 2019, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 7, diff --git a/pallets/runtime/testnet/src/runtime.rs b/pallets/runtime/testnet/src/runtime.rs index 943d60d45c..ab4acb62fa 100644 --- a/pallets/runtime/testnet/src/runtime.rs +++ b/pallets/runtime/testnet/src/runtime.rs @@ -59,7 +59,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // and set impl_version to 0. If only runtime // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. - spec_version: 2018, + spec_version: 2019, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 7, diff --git a/pallets/staking/src/lib.rs b/pallets/staking/src/lib.rs index 0fe28a622f..0e2c9c3dd7 100644 --- a/pallets/staking/src/lib.rs +++ b/pallets/staking/src/lib.rs @@ -2484,12 +2484,7 @@ decl_module! { /// # /// See `crate::weight` module. /// # - #[weight = ::WeightInfo::submit_solution_better( - size.validators.into(), - size.nominators.into(), - compact.len() as u32, - winners.len() as u32, - )] + #[weight = (T::MaximumExtrinsicWeight::get(), Operational)] pub fn submit_election_solution( origin, winners: Vec, @@ -2518,12 +2513,7 @@ decl_module! { /// # /// See `crate::weight` module. /// # - #[weight = ::WeightInfo::submit_solution_better( - size.validators.into(), - size.nominators.into(), - compact.len() as u32, - winners.len() as u32, - )] + #[weight = (T::MaximumExtrinsicWeight::get(), Operational)] pub fn submit_election_solution_unsigned( origin, winners: Vec, From 0e76ac6d5f46d05f7a6c2d06569f68f5fa7b4e12 Mon Sep 17 00:00:00 2001 From: Adam Dossa Date: Fri, 28 May 2021 13:23:49 +0100 Subject: [PATCH 2/2] Fix merge --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index c933e44b11..3d07feee66 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [package] +name = "polymesh" version = "3.0.3" authors = ["Polymath"] build = "build.rs"