You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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:
pallets/capacity/src/lib.rs#on_initialize
See if it's possible to do some refactors, especially for things like,
increase_stake_and_issue_boost_capacity
withincrease_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
toset_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
The text was updated successfully, but these errors were encountered: