raft: remove vestigial canStep

This commit is contained in:
Blake Mizerany 2014-06-15 18:37:30 -07:00 committed by Yicheng Qin
parent 6044b1a0d7
commit 67808f8db1

View File

@ -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