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

Fix inserted_at for seniority to Utc::now() #890

Merged
merged 2 commits into from
Nov 7, 2024
Merged

Conversation

macpie
Copy link
Member

@macpie macpie commented Nov 4, 2024

I do no think we need to fix current DB as this does not seem to impact much things.

  • fetch_latest does not care about inserted_at.
  • fetch_seniority is the only place where inserted_at is used to order seniority records. If we update the old fields we might alter the result or previous rewards run better leave the DB alone there IMO.
  • I still need to check on proto records:
proto::SeniorityUpdate {
  key_type: Some(self.key.into()),
  new_seniority_timestamp: new_seniority.timestamp() as u64,
  reason: update_reason as i32,
  new_seniority_timestamp_ms: new_seniority.timestamp_millis() as u64,
},

The proto does not care about inserted_at anywhere I could find

@macpie macpie requested a review from bbalser November 4, 2024 23:45
@macpie macpie marked this pull request as ready for review November 5, 2024 18:37
@macpie macpie merged commit 6c67e36 into main Nov 7, 2024
17 checks passed
@macpie macpie deleted the macpie/seniority_fix branch November 7, 2024 18:33
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