From b3916a393ff8e223ee14bcee204e84c3bc5c9255 Mon Sep 17 00:00:00 2001 From: GhostComputing Date: Fri, 5 Jan 2018 10:24:50 +0800 Subject: [PATCH] raft: fix wrong comments in "mustCheckOutOfBounds" --- raft/log_unstable.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft/log_unstable.go b/raft/log_unstable.go index 263af9ce4..a8a8f5ca1 100644 --- a/raft/log_unstable.go +++ b/raft/log_unstable.go @@ -147,7 +147,7 @@ func (u *unstable) slice(lo uint64, hi uint64) []pb.Entry { return u.entries[lo-u.offset : hi-u.offset] } -// u.offset <= lo <= hi <= u.offset+len(u.offset) +// u.offset <= lo <= hi <= u.offset+len(u.entries) func (u *unstable) mustCheckOutOfBounds(lo, hi uint64) { if lo > hi { u.logger.Panicf("invalid unstable.slice %d > %d", lo, hi)