-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: check quorums registered detail #331
feat: check quorums registered detail #331
Conversation
return nil, err | ||
} | ||
numBits := value.BitLen() | ||
quorums := make([]bool, numBits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are you using this quorums array? Wouldn't you rather have a map instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, initially i thought we could use index of the array as the quorum index, but yes i have changed it to use a map for more easier to understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think you should only be inputting the non zero quorums into the map? Aka treating it as a set instead of a map. That way you would iterate only on quorums that are nonzero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to show zero quorums as well? so one use this function can easily get:
- which quorum(s) the operator is in already
- which quorum(s) the operator is not in
so he can adjust the strategy accordingly, i.e. re-join the missing quorum again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. In that case don’t think map is needed and we can revert to array then haha?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted to use array
Add a function to query bitmap of quorums and convert it into human-readable format which is boolean array.
What Changed?
Reviewer Checklist