-
Notifications
You must be signed in to change notification settings - Fork 8
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
ensure submitted ballot is correct size and with non empty ElG Pairs #25
Conversation
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.
Nice 👍
Just a question: what happens if the ballot is not encrypted with the public key ? I guess it would just end with a garbage decrypted ballot, but until we are sure about that I would create a new issue for this specific case, before closing #17 .
contracts/evoting/mod_test.go
Outdated
@@ -192,6 +192,56 @@ func TestCommand_CastVote(t *testing.T) { | |||
dummyElection.Status = types.Open | |||
jsElection, _ = json.Marshal(dummyElection) | |||
|
|||
_ = snap.Set(dummyElectionIdBuff, jsElection) |
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.
you should not ignore an error
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.
same bellow
Good question, I added a ballot from a different public key in the scenario test and the decryption seems to never end :(. (#26 ) |
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.
Thank you, works fine like that!
chore: fix Docker image build CI
Addresses issues #17 to ensure that when a vote is casted, it's non empty and it won't fail the shuffle