mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: remove unused function maybeAppend
Signed-off-by: Blake Mizerany <blake.mizerany@gmail.com>
This commit is contained in:
parent
74737b76cc
commit
cb7b75c15f
@ -146,14 +146,6 @@ func (sm *stateMachine) append(after int, ents ...Entry) int {
|
||||
return len(sm.log) - 1
|
||||
}
|
||||
|
||||
func (sm *stateMachine) maybeAppend(index, logTerm int, ents ...Entry) bool {
|
||||
if sm.isLogOk(index, logTerm) {
|
||||
sm.append(index, ents...)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (sm *stateMachine) isLogOk(i, term int) bool {
|
||||
if i > sm.li() {
|
||||
return false
|
||||
|
Loading…
x
Reference in New Issue
Block a user