From 14ce7f3366a2502a92a38a7fb57fb0b132d0394a Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 6 Feb 2018 14:48:18 -0500 Subject: [PATCH] types: update comments on ctx.GetOp --- types/context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/context.go b/types/context.go index 649f15b931..4dbf64c3e2 100644 --- a/types/context.go +++ b/types/context.go @@ -186,7 +186,7 @@ func (c Context) WithTxBytes(txBytes []byte) Context { //---------------------------------------- // thePast -// Returns false if ver > 0. +// Returns false if ver <= 0 || ver > len(c.pst.ops). // The first operation is version 1. func (c Context) GetOp(ver int64) (Op, bool) { return c.pst.getOp(ver) @@ -232,7 +232,7 @@ func (pst *thePast) version() int { return pst.ver } -// Returns false if ver > 0. +// Returns false if ver <= 0 || ver > len(pst.ops). // The first operation is version 1. func (pst *thePast) getOp(ver int64) (Op, bool) { pst.mtx.RLock()