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

core/validatorapi: add validators to router #259

Merged
merged 5 commits into from
Mar 22, 2022

Conversation

corverroos
Copy link
Contributor

Adds the /eth/v1/beacon/states/{state_id}/validators endpoint to validatorapi router.

Also fixes:

  • Marshalling of dependent_root.
  • Parsing attestation_data parameters.
  • Duty data marshalling if empty.
  • Proxy if target includes basic auth.

category: feature
ticket: #251

@codecov
Copy link

codecov bot commented Mar 21, 2022

Codecov Report

Merging #259 (cd9790c) into main (e8eb600) will increase coverage by 0.12%.
The diff coverage is 60.83%.

❗ Current head cd9790c differs from pull request most recent head e76b30d. Consider uploading reports for the commit e76b30d to get more accurate results

@@            Coverage Diff             @@
##             main     #259      +/-   ##
==========================================
+ Coverage   55.78%   55.91%   +0.12%     
==========================================
  Files          53       53              
  Lines        3671     3781     +110     
==========================================
+ Hits         2048     2114      +66     
- Misses       1345     1374      +29     
- Partials      278      293      +15     
Impacted Files Coverage Δ
core/validatorapi/router.go 64.70% <60.36%> (-2.42%) ⬇️
core/validatorapi/eth2types.go 59.09% <66.66%> (+5.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8eb600...e76b30d. Read the comment docs.

Copy link
Contributor

@dB2510 dB2510 left a comment

Choose a reason for hiding this comment

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

Looks Great!

@@ -337,6 +427,36 @@
// uintParam returns a uint path parameter.
func uintParam(params map[string]string, name string) (uint64, error) {
param := params[name]
if param == "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

can use comma ok idiom here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah

@corverroos corverroos merged commit 5417695 into main Mar 22, 2022
@corverroos corverroos deleted the corver/beaconmockrefactor branch March 22, 2022 07:35
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