Skip to content

Commit

Permalink
Merge pull request #3244 from autonomys/update-enable-rewards
Browse files Browse the repository at this point in the history
remove check of existing EnableRewards value set
  • Loading branch information
dariolina authored Nov 20, 2024
2 parents 95bfe78 + 31eef99 commit 1682628
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions crates/pallet-subspace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,6 @@ pub mod pallet {
pub enum Error<T> {
/// 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
Expand Down Expand Up @@ -1116,10 +1114,6 @@ impl<T: Config> Pallet<T> {
fn do_enable_rewards_at(
enable_rewards_at: EnableRewardsAt<BlockNumberFor<T>>,
) -> DispatchResult {
if EnableRewards::<T>::get().is_some() {
return Err(Error::<T>::RewardsAlreadyEnabled.into());
}

match enable_rewards_at {
EnableRewardsAt::Height(block_number) => {
// Enable rewards at a particular block height (default to the next block after
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1682628

Please sign in to comment.