Explorar o código

raft: fix wrong comments in "mustCheckOutOfBounds"

GhostComputing %!s(int64=8) %!d(string=hai) anos
pai
achega
b3916a393f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      raft/log_unstable.go

+ 1 - 1
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)