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

[Chores]: Provider Boost touch-ups #2207

Open
1 of 7 tasks
shannonwells opened this issue Oct 31, 2024 · 0 comments
Open
1 of 7 tasks

[Chores]: Provider Boost touch-ups #2207

shannonwells opened this issue Oct 31, 2024 · 0 comments

Comments

@shannonwells
Copy link
Collaborator

shannonwells commented Oct 31, 2024

Description

Some suggested touch-ups we may consider or should do, from review comments. These can be separated into other issues but this will be the central one.

From @enddynayn:

Just leaving this as a note: we might want to consider using the new Poll hook instead of on_initialize. Here’s the relevant issue for reference: #2098.

  • See if it's possible to do some refactors, especially for things like, increase_stake_and_issue_boost_capacity with increase_stake_and_issue_capacity. When I was implementing it, the code was getting really complicated and entangled so I separated it even though there would be some duplicate code. There could be other possibilities for small optimizations though.

  • rename set_target_details to set_or_delete_target_details ?

  • refactor to avoid upserting records. Split these up instead or just use the storage calls directly (inline), maybe.

  • in start_new_reward_era_if_needed, @aramikm suggests to make the >= just an =.

  • capacity_generated -> calculate_capacity: this was out of scope for the PR since this was its name before the feature.

Possible Related Issues

Searched for Related Issues

  • I have done a search for related issues and either found none, or noted them
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

No branches or pull requests

1 participant