public static Responder blockchainResponder(
      final Blockchain blockchain,
      final WorldStateArchive worldStateArchive,
      final TransactionPool transactionPool) {
    final int maxMsgSize = EthProtocolConfiguration.DEFAULT_MAX_MESSAGE_SIZE;
    return (cap, msg) -> {
      MessageData response = null;
      switch (msg.getCode()) {
        case EthProtocolMessages.GET_BLOCK_HEADERS:
          response = EthServer.constructGetHeadersResponse(blockchain, msg, 200, maxMsgSize);
          break;
        case EthProtocolMessages.GET_BLOCK_BODIES:
          response = EthServer.constructGetBodiesResponse(blockchain, msg, 200, maxMsgSize);
          break;
        case EthProtocolMessages.GET_RECEIPTS:
          response = EthServer.constructGetReceiptsResponse(blockchain, msg, 200, maxMsgSize, cap);
          break;
        case EthProtocolMessages.GET_NODE_DATA:
          response =
              EthServer.constructGetNodeDataResponse(worldStateArchive, msg, 200, maxMsgSize);
          break;
        case EthProtocolMessages.GET_POOLED_TRANSACTIONS:
          response =
              EthServer.constructGetPooledTransactionsResponse(
                  transactionPool, msg, 200, maxMsgSize);
      }
      return Optional.ofNullable(response);
    };
  }
@return True if any requests were processed
ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/RespondingEthPeer.java