code: func (itr *blocksItr) Next() (ledger.QueryResult, error) {
  	if itr.maxBlockNumAvailable < itr.blockNumToRetrieve {
  		itr.maxBlockNumAvailable = itr.waitForBlock(itr.blockNumToRetrieve)
  	}
  	itr.closeMarkerLock.Lock()
  	defer itr.closeMarkerLock.Unlock()
  	if itr.closeMarker {
  		return nil, nil
  	}
  	if itr.stream == nil {
  		logger.Debugf("Initializing block stream for iterator. itr.maxBlockNumAvailable=%d", itr.maxBlockNumAvailable)
  		if err := itr.initStream(); err != nil {
  			return nil, err
  		}
  	}
  	nextBlockBytes, err := itr.stream.nextBlockBytes()
  	if err != nil {
  		return nil, err
  	}
  	itr.blockNumToRetrieve++
  	return deserializeBlock(nextBlockBytes)
  }
docs: // Next moves the cursor to next block and returns true iff the iterator is not exhausted