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

go/worker/keymanager: Refactor the main loop in the key manager worker #5212

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

peternose
Copy link
Contributor

Simplify the main for loop and organize the code by adding additional functions.

@peternose peternose force-pushed the peternose/internal/refactor_km_worker branch from 19950c9 to 24d21e7 Compare March 6, 2023 09:39
@codecov
Copy link

codecov bot commented Mar 6, 2023

Codecov Report

Merging #5212 (24d21e7) into master (9e3c06f) will increase coverage by 0.07%.
The diff coverage is 66.52%.

❗ Current head 24d21e7 differs from pull request most recent head 01e9f22. Consider uploading reports for the commit 01e9f22 to get more accurate results

@@            Coverage Diff             @@
##           master    #5212      +/-   ##
==========================================
+ Coverage   61.30%   61.38%   +0.07%     
==========================================
  Files         512      512              
  Lines       54246    54243       -3     
==========================================
+ Hits        33256    33295      +39     
+ Misses      16754    16721      -33     
+ Partials     4236     4227       -9     
Impacted Files Coverage Δ
go/worker/keymanager/worker.go 64.43% <63.38%> (+1.36%) ⬆️
go/worker/keymanager/init.go 63.79% <95.65%> (+1.97%) ⬆️
go/worker/storage/p2p/sync/server.go 32.25% <0.00%> (-3.23%) ⬇️
go/governance/api/api.go 68.59% <0.00%> (-1.66%) ⬇️
go/worker/common/committee/node.go 57.80% <0.00%> (-1.54%) ⬇️
go/consensus/tendermint/abci/mux.go 44.44% <0.00%> (-1.39%) ⬇️
go/consensus/tendermint/full/full.go 52.71% <0.00%> (-0.39%) ⬇️
go/storage/mkvs/db/badger/badger.go 69.28% <0.00%> (-0.34%) ⬇️
go/worker/registration/worker.go 60.88% <0.00%> (-0.17%) ⬇️
... and 13 more

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

@peternose peternose marked this pull request as ready for review March 6, 2023 10:30
}

func (w *Worker) handleNewEphemeralSecret(secret *api.SignedEncryptedEphemeralSecret, epoch beacon.EpochTime) {
if secret.Secret.ID != w.runtimeID {
Copy link
Member

Choose a reason for hiding this comment

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

Direct comparison here, .Equal above? Should it be made consistent?

Simplify the main for loop and organize the code by adding additional
functions.
@peternose peternose force-pushed the peternose/internal/refactor_km_worker branch from 24d21e7 to 01e9f22 Compare March 7, 2023 09:57
@peternose peternose enabled auto-merge March 7, 2023 10:53
@peternose peternose merged commit 50b6ab3 into master Mar 7, 2023
@peternose peternose deleted the peternose/internal/refactor_km_worker branch March 7, 2023 11:02
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.

None yet

2 participants