Search in sources :

Example 1 with PendingTransactionsReport

use of org.hyperledger.besu.ethstats.report.PendingTransactionsReport in project besu by hyperledger.

the class EthStatsService method sendPendingTransactionReport.

/**
 * Sends the number of pending transactions in the pool
 */
private void sendPendingTransactionReport() {
    final int pendingTransactionsNumber = transactionPool.getPendingTransactions().size();
    final PendingTransactionsReport pendingTransactionsReport = ImmutablePendingTransactionsReport.builder().id(enodeURL.getNodeId().toHexString()).stats(pendingTransactionsNumber).build();
    sendMessage(webSocket, new EthStatsRequest(PENDING, pendingTransactionsReport));
}
Also used : EthStatsRequest(org.hyperledger.besu.ethstats.request.EthStatsRequest) ImmutablePendingTransactionsReport(org.hyperledger.besu.ethstats.report.ImmutablePendingTransactionsReport) PendingTransactionsReport(org.hyperledger.besu.ethstats.report.PendingTransactionsReport)

Aggregations

ImmutablePendingTransactionsReport (org.hyperledger.besu.ethstats.report.ImmutablePendingTransactionsReport)1 PendingTransactionsReport (org.hyperledger.besu.ethstats.report.PendingTransactionsReport)1 EthStatsRequest (org.hyperledger.besu.ethstats.request.EthStatsRequest)1