Browse Source

raft: remove vestigial canStep

Blake Mizerany 11 years ago
parent
commit
67808f8db1
1 changed files with 0 additions and 7 deletions
  1. 0 7
      raft/raft.go

+ 0 - 7
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