code: func (m *mgr) HandleStateUpdates(trigger *ledger.StateUpdateTrigger) error {
  	updatedCCs, err := m.ccInfoProvider.UpdatedChaincodes(convertToKVWrites(trigger.StateUpdates))
  	if err != nil {
  		return err
  	}
  	if len(updatedCCs) == 0 {
  		logger.Errorf("Config history manager is expected to recieve events only if at least one chaincode is updated stateUpdates = %#v",
  			trigger.StateUpdates)
  		return nil
  	}
  	updatedCollConfigs := map[string]*common.CollectionConfigPackage{}
  	for _, cc := range updatedCCs {
  		ccInfo, err := m.ccInfoProvider.ChaincodeInfo(cc.Name, trigger.PostCommitQueryExecutor)
  		if err != nil {
  			return err
  		}
  		if ccInfo.CollectionConfigPkg == nil {
  			continue
  		}
  		updatedCollConfigs[ccInfo.Name] = ccInfo.CollectionConfigPkg
  	}
  	if len(updatedCollConfigs) == 0 {
  		return nil
  	}
  	batch, err := prepareDBBatch(updatedCollConfigs, trigger.CommittingBlockNum)
  	if err != nil {
  		return err
  	}
  	dbHandle := m.dbProvider.getDB(trigger.LedgerID)
  	return dbHandle.writeBatch(batch, true)
  }
docs: // HandleStateUpdates implements function from the interface ledger.StateListener
  // In this implementation, the latest collection config package is retrieved via
  // ledger.DeployedChaincodeInfoProvider and is persisted as a separate entry in a separate db.
  // The composite key for the entry is a tuple of <blockNum, namespace, key>