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 speedtests handling, ensure rewards only include tests up until epoch end #581

Merged
merged 4 commits into from
Aug 30, 2023

Conversation

andymck
Copy link
Contributor

@andymck andymck commented Jul 26, 2023

Refactor the speedtests to prevent scenario whereby the rewards can use reports from after the epoch end. To accommodate this I had to explode the speedtests reports in the DB from 1 row containing an array of up to 6 reports out into 1 row per report.

At the same time i have split the averaging code out from the speedtest module into its own module for better readability and maintainability.

  • Add migration to explode speedtests out to 1 test per db row
  • delete speedtests after rewarding ( ensure we keep 48hrs worth of tests )
  • handle todo's
  • test locally
  • tidy up
  • add indexes to speedtest table

@andymck andymck marked this pull request as ready for review July 28, 2023 09:53
@andymck andymck merged commit 1a3fd57 into main Aug 30, 2023
1 check passed
@andymck andymck deleted the andymck/roll-avg-refactor branch August 30, 2023 13:43
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.

4 participants