// retrieveIterator will recover an iterator based on index. This ensures it will not be garbage collected.
// We start counting with 1, in storeIterator so the 0 value is flagged as an error. This means we must
// remember to do idx-1 when retrieving
retrieveIterator will recover an iterator based on index. This ensures it will not be garbage collected.
We start counting with 1, in storeIterator so the 0 value is flagged as an error. This means we must
remember to do idx-1 when retrieving
// retrieveIterator will recover an iterator based on index . This ensures it will not be garbage collected . // We start counting with 1 in storeIterator so the 0 value is flagged as an error . This means we must // remember to do idx - 1 when retrieving
func retrieveIterator(callID uint64, index uint64) dbm.Iterator {
	iteratorFramesMutex.Lock()
	defer iteratorFramesMutex.Unlock()
	myFrame := iteratorFrames[callID]
	if myFrame == nil {
		return nil
	}
	posInFrame := int(index) - 1
	if posInFrame < 0 || posInFrame >= len(myFrame) {
		return nil
	}
	return myFrame[posInFrame]
}
func retrieveIterator ( callID uint64 , index uint64 ) dbm . Iterator { iteratorFramesMutex . Lock ( ) defer iteratorFramesMutex . Unlock ( ) myFrame := iteratorFrames [ callID ] if myFrame == nil { return nil } posInFrame := int ( index ) - 1 if posInFrame < 0 || posInFrame >= len ( myFrame ) { return nil } return myFrame [ posInFrame ] }
retrieveIterator will recover an iterator based on index.
retrieveIterator will recover an iterator based on index .
// index out of range