Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove check of existing EnableRewards value set #3244

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Conversation

dariolina
Copy link
Member

To allow changing the set solution range or manual enablement

Code contributor checklist:

Copy link
Member

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is certainly one way to do it 🙂

@@ -1116,10 +1116,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());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove the case that triggers it, then also remove corresponding enum variant from Error, though I don't know if we need to maintain variant indices in SCALE encoding, maybe @vedhavyas knows

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its fine to remove the error variant.
Shouldn't be any scale issue within the runtime.
I dont see any usages of this variant outside runtime

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we can remove the whole ability to set/reset rewards and solution range adjustment shortly.

@dariolina dariolina enabled auto-merge November 20, 2024 13:01
@dariolina dariolina added this pull request to the merge queue Nov 20, 2024
Merged via the queue into main with commit 1682628 Nov 20, 2024
8 checks passed
@dariolina dariolina deleted the update-enable-rewards branch November 20, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants