code: func (scanner *RwsetScanner) NextWithConfig() (*EndorserPvtSimulationResultsWithConfig, error) {
  	if !scanner.dbItr.Next() {
  		return nil, nil
  	}
  	dbKey := scanner.dbItr.Key()
  	dbVal := scanner.dbItr.Value()
  	_, blockHeight := splitCompositeKeyOfPvtRWSet(dbKey)
  
  	txPvtRWSet := &rwset.TxPvtReadWriteSet{}
  	filteredTxPvtRWSet := &rwset.TxPvtReadWriteSet{}
  	txPvtRWSetWithConfig := &transientstore.TxPvtReadWriteSetWithConfigInfo{}
  
  	if dbVal[0] == nilByte {
  		// new proto, i.e., TxPvtReadWriteSetWithConfigInfo
  		if err := proto.Unmarshal(dbVal[1:], txPvtRWSetWithConfig); err != nil {
  			return nil, err
  		}
  
  		filteredTxPvtRWSet = trimPvtWSet(txPvtRWSetWithConfig.GetPvtRwset(), scanner.filter)
  		configs, err := trimPvtCollectionConfigs(txPvtRWSetWithConfig.CollectionConfigs, scanner.filter)
  		if err != nil {
  			return nil, err
  		}
  		txPvtRWSetWithConfig.CollectionConfigs = configs
  	} else {
  		// old proto, i.e., TxPvtReadWriteSet
  		if err := proto.Unmarshal(dbVal, txPvtRWSet); err != nil {
  			return nil, err
  		}
  		filteredTxPvtRWSet = trimPvtWSet(txPvtRWSet, scanner.filter)
  	}
  
  	txPvtRWSetWithConfig.PvtRwset = filteredTxPvtRWSet
  
  	return &EndorserPvtSimulationResultsWithConfig{
  		ReceivedAtBlockHeight:          blockHeight,
  		PvtSimulationResultsWithConfig: txPvtRWSetWithConfig,
  	}, nil
  }
docs: // Next moves the iterator to the next key/value pair.
  // It returns whether the iterator is exhausted.
  // TODO: Once the related gossip changes are made as per FAB-5096, rename this function to Next