public Collection<Transaction> reduce(
      final Collection<PendingTransaction> pendingTransactions,
      final List<Filter> filters,
      final int limit)
      throws InvalidJsonRpcParameters {
    return pendingTransactions.stream()
        .filter(pendingTx -> applyFilters(pendingTx, filters))
        .limit(limit)
        .map(PendingTransaction::getTransaction)
        .toList();
  }
This class allows to filter a list of pending transactions

<p>Here is the list of fields that can be used to filter a transaction : from, to, gas, gasPrice,
value, nonce
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/transaction/pool/PendingTransactionFilter.java