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

Get rid of the GetShare pattern that loops over share map #452

Open
GalRogozinski opened this issue Jul 4, 2024 · 1 comment
Open

Get rid of the GetShare pattern that loops over share map #452

GalRogozinski opened this issue Jul 4, 2024 · 1 comment
Labels

Comments

@GalRogozinski
Copy link
Contributor

Description

We have places in code where we assume that the first share has common properties with all other committee shares.
So we extract the first share to get the data.
Even though correct, this is hacky, and we shouldn't do this.

e.g.

// Get committee (unique for runner)
var shareSample *types.Share
for _, share := range b.Share {
shareSample = share
break
}
if shareSample == nil {
return errors.New("can not get committee because there is no share in runner")
}
committee := shareSample.Committee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant