From 67808f8db131ef8964e867ba709762f69d9b5cd5 Mon Sep 17 00:00:00 2001 From: Blake Mizerany Date: Sun, 15 Jun 2014 18:37:30 -0700 Subject: [PATCH] raft: remove vestigial canStep --- raft/raft.go | 7 ------- 1 file changed, 7 deletions(-) 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