docs: private String registerChaincodeListenerProcessor() throws InvalidArgumentException {
          logger.debug(format("Channel %s registerChaincodeListenerProcessor starting", name));
  
          // Chaincode event listener is internal Block listener for chaincode events.
  
          return registerBlockListener(blockEvent -> {
  
              if (chainCodeListeners.isEmpty()) {
                  return;
              }
  
              LinkedList<ChaincodeEvent> chaincodeEvents = new LinkedList<>();
  
              //Find the chaincode events in the transactions.
  
              for (TransactionEvent transactionEvent : blockEvent.getTransactionEvents()) {
  
                  logger.debug(format("Channel %s got event for transaction %s ", name, transactionEvent.getTransactionID()));
  
                  for (BlockInfo.TransactionEnvelopeInfo.TransactionActionInfo info : transactionEvent.getTransactionActionInfos()) {
  
                      ChaincodeEvent event = info.getEvent();
                      if (null != event) {
                          chaincodeEvents.add(event);
                      }
  
                  }
  
              }
  
              if (!chaincodeEvents.isEmpty()) {
  
                  class MatchPair {
                      final ChaincodeEventListenerEntry eventListener;
                      final ChaincodeEvent event;
  
                      MatchPair(ChaincodeEventListenerEntry eventListener, ChaincodeEvent event) {
                          this.eventListener = eventListener;
                          this.event = event;
                      }
                  }
  
                  List<MatchPair> matches = new LinkedList<>(); //Find matches.
  
                  synchronized (chainCodeListeners) {
  
                      for (ChaincodeEventListenerEntry chaincodeEventListenerEntry : chainCodeListeners.values()) {
  
                          for (ChaincodeEvent chaincodeEvent : chaincodeEvents) {
  
                              if (chaincodeEventListenerEntry.isMatch(chaincodeEvent)) {
  
                                  matches.add(new MatchPair(chaincodeEventListenerEntry, chaincodeEvent));
                              }
  
                          }
  
                      }
                  }
  
                  //fire events
                  for (MatchPair match : matches) {
  
                      ChaincodeEventListenerEntry chaincodeEventListenerEntry = match.eventListener;
                      ChaincodeEvent ce = match.event;
                      chaincodeEventListenerEntry.fire(blockEvent, ce);
  
                  }
  
              }
  
          });
      }