func (this *Election) doRestoreElection(state *thispb.ElectionState) { atomic.StoreInt64(&this.currentRound, state.GetCurrentRound()) this.currentWinner = state.GetCurrentWinner() }
func (this *Election) doSaveElection(state *thispb.ElectionState) { state.CurrentRound = proto.Int64(this.CurrentRound()) state.CurrentWinner = proto.String(this.currentWinner) }