-
Notifications
You must be signed in to change notification settings - Fork 1
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
399 Attempt to finalize at round #703
Conversation
…able and place it to the methods where they are calculated
); | ||
|
||
long totalVoters = grandpaSetState.getAuthorities().size(); | ||
long threshold = (2 * totalVoters) / 3; |
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.
Can you put a comment with a link showing how these numbers were chosen or explain them in he comment, because they look like magic numbers right now.
} | ||
|
||
public void cleanCommitMessagesArchive() { | ||
commitMessagesArchive.remove(setId.subtract(BigInteger.TWO)); |
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.
Why are we subtracting 2 here?
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.
The only reason is that we will only need the commit messages for the current set and in the edge case also the commit messages from the previous set. By subtracting 2 I delete commit messages for older sets. I will add a comment about the reason behind that action because this is not defined in the spec.
…und getters when fields are null
Quality Gate passedIssues Measures |
Description
getBestFinalCandidate
,getGrandpaGhost
andgetBestPreVoteCandidate
tofindBestFinalCandidate
,findGrandpaGhost
andfindBestPreVoteCandidate
in theGrandpaService
in order not to have different names from theGrandpaRound
gettersGrandpaGhost
andBestFinalCandidate
fields of theGrandpaRound
object are now being set directly in the methodsfindGrandpaGhost()
andfindBestFinalCandidate()
, rather than inisFinalizable()
commitMessagesArchive
, a map ofSetId
as a key, and a list of commit messages as value. On every new set start the commit messages for (setId - 2) are deleted because they will probably never be used again.Fixes: #399