return currentTerm and whether this server believes it is the leader.
()
| 69 | // return currentTerm and whether this server |
| 70 | // believes it is the leader. |
| 71 | func (rf *Raft) GetState() (int, bool) { |
| 72 | |
| 73 | var term int |
| 74 | var isleader bool |
| 75 | // Your code here (2A). |
| 76 | return term, isleader |
| 77 | } |
| 78 | |
| 79 | // |
| 80 | // save Raft's persistent state to stable storage, |
no outgoing calls