Skip to content
Snippets Groups Projects
Commit f06622d4 authored by Ben Adida's avatar Ben Adida
Browse files

move logging to after the saving of the encrypted answer, just to be extra safe

parent ec96c4ec
Branches
No related tags found
No related merge requests found
......@@ -139,12 +139,11 @@ BOOTH.setup_workers = function(election_raw_json) {
// result of encryption
if (event.data.type == 'result') {
BOOTH.log("got encrypted answer " + q_num);
// this check ensures that race conditions
// don't screw up votes.
if (event.data.id == BOOTH.answer_timestamps[q_num]) {
BOOTH.encrypted_answers[q_num] = HELIOS.EncryptedAnswer.fromJSONObject(event.data.encrypted_answer, BOOTH.election);
BOOTH.log("got encrypted answer " + q_num);
} else {
BOOTH.log("no way jose");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment