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 support for DutySyncMessage #1244

Merged
merged 3 commits into from
Oct 10, 2022

Conversation

xenowits
Copy link
Contributor

Adds support for DutySyncMessage to validatorapi component. Also, adds tests.

category: feature
ticket: #1188

@codecov
Copy link

codecov bot commented Oct 10, 2022

Codecov Report

Base: 53.54% // Head: 53.57% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (82926f9) compared to base (698d02a).
Patch coverage: 57.89% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1244      +/-   ##
==========================================
+ Coverage   53.54%   53.57%   +0.03%     
==========================================
  Files         139      139              
  Lines       16152    16208      +56     
==========================================
+ Hits         8648     8684      +36     
- Misses       6260     6270      +10     
- Partials     1244     1254      +10     
Impacted Files Coverage Δ
eth2util/signing/signing.go 42.56% <ø> (ø)
core/validatorapi/validatorapi.go 55.95% <53.84%> (-0.15%) ⬇️
core/validatorapi/router.go 62.92% <66.66%> (+0.04%) ⬆️
core/dutydb/memory.go 66.38% <0.00%> (-0.85%) ⬇️
core/scheduler/scheduler.go 73.13% <0.00%> (-0.54%) ⬇️
app/vmock.go 71.89% <0.00%> (ø)
core/priority/prioritiser.go 61.84% <0.00%> (+1.31%) ⬆️
dkg/transport.go 66.66% <0.00%> (+12.96%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.


data, ok := set[pk]
require.True(t, ok)
require.Equal(t, core.NewPartialSignedSyncMessage(msg, 0), data)
Copy link
Contributor

Choose a reason for hiding this comment

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

how do you know this code is actually called? (please do not use ctx cancel pattern, anymore, rather use something like

done := make(chan struct)
...
close(done)
...
<-done   

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can add a counter which is incremented each time the subscription function is called. we can use it to assert that this code block is actually called.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but this test doesn't use the ctx cancel pattern

Copy link
Contributor

Choose a reason for hiding this comment

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

as long as it is threadsafe then sure

@xenowits xenowits added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 10, 2022
@obol-bulldozer obol-bulldozer bot merged commit 4bd0c08 into main Oct 10, 2022
@obol-bulldozer obol-bulldozer bot deleted the xenowits/sync-msg-vapi branch October 10, 2022 08:48
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