M cmd/tallyard/main.go => cmd/tallyard/main.go +2 -0
@@ 162,6 162,8 @@ func main() {
}
el.PrintResults()
+
+ el.Finish()
}
func debugEventHook(_ mautrix.EventSource, evt *event.Event) {
M election/voter.go => election/voter.go +8 -0
@@ 218,3 218,11 @@ func (el *Election) SendSum(client *mautrix.Client, eventStore *EventStore) erro
return nil
}
+
+func (el *Election) Finish() {
+ el.Lock()
+ defer el.Save()
+ defer el.Unlock()
+ // the election is over; throw away the keys!
+ el.LocalVoter = nil
+}