add check of rosterLen before sending dkg request#223
Conversation
Pull Request Test Coverage Report for Build 3535095716Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
67577d2 to
06d20e9
Compare
|
Kudos, SonarCloud Quality Gate passed! |
emduc
left a comment
There was a problem hiding this comment.
Nice small optimization :)
| if players.Len() == 0 { | ||
| return xerrors.Errorf("the list of Participants is empty") | ||
| } |
There was a problem hiding this comment.
should we call a.setErr here ?
This function is called when we want to decrypt the ballots, so I am wondering what we would be able to do / should do in the scenario where players is empty...
There was a problem hiding this comment.
yes, true.
@Flamewind97 please add a setErr as in other cases.
There was a problem hiding this comment.
In the end we don't need, I mixed the context.
| if players.Len() == 0 { | ||
| return xerrors.Errorf("the list of Participants is empty") | ||
| } |
There was a problem hiding this comment.
yes, true.
@Flamewind97 please add a setErr as in other cases.
| if players.Len() == 0 { | ||
| return xerrors.Errorf("the list of Participants is empty") | ||
| } |
There was a problem hiding this comment.
In the end we don't need, I mixed the context.








Before defines every addrs array in services, we check the rosterLen is not empty to have an early return