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/bcast: implementation for builder registration #881

Conversation

ciaranmcveigh5
Copy link
Contributor

  • bcast implementation for builder registration
  • relevant test case

category: feature
ticket: #849

aggData := core.VersionedSignedValidatorRegistration{VersionedSignedValidatorRegistration: registration}

mock.SubmitValidatorRegistrationsFunc = func(ctx context.Context, registrations []*eth2api.VersionedSignedValidatorRegistration) error {
require.Equal(t, aggData.VersionedSignedValidatorRegistration, *registrations[0])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this bcast is submitting 1 validator registration so we compare registrations[0]

should we be constructing an array with mutliple registrations and checking that array is equal to the registrations (array) in the mocksSubmitValidatorRegistrationsFunc

Copy link
Contributor

Choose a reason for hiding this comment

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

can do that or just check the length is 1

case core.DutyBuilderRegistration:
registration, ok := aggData.(core.VersionedSignedValidatorRegistration)
if !ok {
return errors.New("invalid exit")
Copy link
Contributor

Choose a reason for hiding this comment

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

"invalid registration"

aggData := core.VersionedSignedValidatorRegistration{VersionedSignedValidatorRegistration: registration}

mock.SubmitValidatorRegistrationsFunc = func(ctx context.Context, registrations []*eth2api.VersionedSignedValidatorRegistration) error {
require.Equal(t, aggData.VersionedSignedValidatorRegistration, *registrations[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

can do that or just check the length is 1

@ciaranmcveigh5 ciaranmcveigh5 force-pushed the ciaran/bcast-builder-registration branch from 1507e63 to 13df4a8 Compare August 2, 2022 08:04
@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #881 (13df4a8) into main (04aa70b) will decrease coverage by 0.02%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##             main     #881      +/-   ##
==========================================
- Coverage   54.47%   54.45%   -0.03%     
==========================================
  Files         114      114              
  Lines       12324    12336      +12     
==========================================
+ Hits         6714     6718       +4     
- Misses       4637     4643       +6     
- Partials      973      975       +2     
Impacted Files Coverage Δ
core/bcast/bcast.go 50.00% <33.33%> (-2.18%) ⬇️

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 04aa70b...13df4a8. Read the comment docs.

@ciaranmcveigh5 ciaranmcveigh5 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Aug 2, 2022
@obol-bulldozer obol-bulldozer bot merged commit 1f9ae69 into ObolNetwork:main Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants