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

Remove array from attestation rewards response #297

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

michaelsproul
Copy link
Collaborator

There was an extra layer of unnecessary array nesting in the attestation rewards response:

{
  "data": [
    {"ideal_rewards": [], "total_rewards": []}
  ]
}

The data list should always have 1 element, because the real lists are contained in ideal_rewards and total_rewards. Therefore this structure is more appropriate:

{
  "data": {"ideal_rewards": [], "total_rewards": []}
}

This is already implemented by Lighthouse in sigp/lighthouse#3822.

Copy link
Collaborator

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

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

LGTM

@michaelsproul michaelsproul merged commit 181575d into ethereum:master Feb 5, 2023
@michaelsproul michaelsproul deleted the simplify-rewards branch February 5, 2023 23:48
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.

2 participants