@@ 664,11 664,11 @@ func (elections *ElectionsMap) onEvalsMessage(evt *event.Event) (success bool) {
}
voter.EvalsID = &evt.ID
- // we're not participating in this election
if el.LocalVoter == nil {
- return true
+ debugf("our device is not a part of this election")
+ return
} else if el.LocalVoter.JoinIDIndex == nil {
- warnf("we didn't join the election in time (or the election creator excluded us)")
+ warnf("our device didn't join the election in time (or the election creator excluded us)")
return
}
ourEval := content.Evals[*el.LocalVoter.JoinIDIndex]
@@ 881,6 881,14 @@ func (elections *ElectionsMap) onSumMessage(evt *event.Event) (success bool) {
sum = new(fr.Element).SetBytes(sumBytes)
}
+ if el.LocalVoter == nil {
+ debugf("our device is not a part of this election")
+ return
+ } else if el.LocalVoter.JoinIDIndex == nil {
+ warnf("our device didn't join the election in time (or the election creator excluded us)")
+ return
+ }
+
var proof groth16.Proof
{
encrypted, err := base64.StdEncoding.DecodeString(content.Proofs[*el.LocalVoter.JoinIDIndex])