From cb7b75c15f5b63dc1f50d9104a94b5514acca652 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Sun, 25 May 2014 10:05:33 -0700 Subject: [PATCH] raft: remove unused function maybeAppend Signed-off-by: Blake Mizerany --- raft/raft.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/raft/raft.go b/raft/raft.go index 414344cea..87068e2e8 100644 --- a/raft/raft.go +++ b/raft/raft.go @@ -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