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

refactor(incentives): skip epoch distribution to perpetual gauges #1655

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mtsitrin
Copy link
Contributor

  • custom created gagues are non-perpetual
  • perpetual gauges not iterated on epoch end

@mtsitrin mtsitrin marked this pull request as ready for review December 16, 2024 08:30
@mtsitrin mtsitrin requested a review from a team as a code owner December 16, 2024 08:30
// }
// get active, non-perpetual gauges
// perpetual gauges are paid directly by the protocol (i.e streamer)
newGauges := make([]types.Gauge, 0, len(gauges))
Copy link
Contributor

Choose a reason for hiding this comment

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

super nit: i guess most of the gauges will be perpetual, so maybe it's worth doing make([]types.Gauge, 0) to avoid runtime overhead. otherwise runtime will try to find a memory slice for len(gauges) though in fact we need much less.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants