Add back the noop entry hint for "becomeLeader" (#148)

from master to course branch
the noop entry is important hint for implementation, else learner will feel confused when test fail.
This commit is contained in:
Rich 2020-04-13 13:38:04 +08:00 committed by Connor
parent bda9f18a70
commit a674bd7ab1

View File

@ -196,6 +196,7 @@ func (r *Raft) becomeCandidate() {
// becomeLeader transform this peer's state to leader
func (r *Raft) becomeLeader() {
// Your Code Here (2A).
// NOTE: Leader should propose a noop entry on its term
}
// Step the entrance of handle message, see `MessageType`