diff --git a/raft/raft.go b/raft/raft.go index a77024181..1fd28e10d 100644 --- a/raft/raft.go +++ b/raft/raft.go @@ -122,13 +122,6 @@ func newStateMachine(id int, peers []int) *stateMachine { return sm } -func (sm *stateMachine) canStep(m Message) bool { - if m.Type == msgProp { - return sm.lead != none - } - return true -} - func (sm *stateMachine) poll(id int, v bool) (granted int) { if _, ok := sm.votes[id]; !ok { sm.votes[id] = v