From 6a83526047257a8e3bea4ba74f309f7dc686791a Mon Sep 17 00:00:00 2001 From: Dariia Porechna <35382599+dariolina@users.noreply.github.com> Date: Wed, 20 Nov 2024 09:39:44 +0100 Subject: [PATCH 1/2] remove check of existing EnableRewards value set --- crates/pallet-subspace/src/lib.rs | 4 ---- crates/subspace-runtime/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/pallet-subspace/src/lib.rs b/crates/pallet-subspace/src/lib.rs index 5c68ababc0..bf70ed4eed 100644 --- a/crates/pallet-subspace/src/lib.rs +++ b/crates/pallet-subspace/src/lib.rs @@ -1116,10 +1116,6 @@ impl Pallet { fn do_enable_rewards_at( enable_rewards_at: EnableRewardsAt>, ) -> DispatchResult { - if EnableRewards::::get().is_some() { - return Err(Error::::RewardsAlreadyEnabled.into()); - } - match enable_rewards_at { EnableRewardsAt::Height(block_number) => { // Enable rewards at a particular block height (default to the next block after diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index d71743c48e..61406da07b 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -130,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: Cow::Borrowed("subspace"), impl_name: Cow::Borrowed("subspace"), authoring_version: 0, - spec_version: 0, + spec_version: 1, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, From 31eef997cf3369945aadfeebdfa7de1bc7cbe111 Mon Sep 17 00:00:00 2001 From: Dariia Porechna <35382599+dariolina@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:59:13 +0100 Subject: [PATCH 2/2] remove RewardsAlreadyEnabled variant error --- crates/pallet-subspace/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/pallet-subspace/src/lib.rs b/crates/pallet-subspace/src/lib.rs index bf70ed4eed..b1dd52d7d4 100644 --- a/crates/pallet-subspace/src/lib.rs +++ b/crates/pallet-subspace/src/lib.rs @@ -371,8 +371,6 @@ pub mod pallet { pub enum Error { /// Solution range adjustment already enabled. SolutionRangeAdjustmentAlreadyEnabled, - /// Rewards already active. - RewardsAlreadyEnabled, /// Iterations are not multiple of number of checkpoints times two NotMultipleOfCheckpoints, /// Proof of time slot iterations must increase as hardware improves