mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: remove vestigial canStep
This commit is contained in:
parent
6044b1a0d7
commit
67808f8db1
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user