-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix eviction of absent participant #20
Conversation
Well Actually lets not merge right now - this fixes the bug we had but it's not fixing it in the case where we dont have fastsync, it's not general enough - I'll refactor the fix tmr |
Ready to review |
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.
test appears to validate the right case
share/dkg/dkg.go
Outdated
// we only need to look at the nodes that did not sent any response, | ||
// since the invalid one are already markes as evicted | ||
allSent := append(validAuthors, d.evictedHolders...) | ||
isPresent := isEvicted |
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.
this is counter-intuitive. from what i can see, this method is only used in this if block. can you directly call 'isEvicted' in the loop below. Renaming it to a variable named the inverse property makes it more confusing what is being checked.
* test + correction on fast sync * removing useless test * adapted to general case * better function name
Linked to drand/drand#752