Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Ensured that the transaction statistics endpoint is exposed. (#1330) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rojotek authored Apr 29, 2019
1 parent bcac581 commit ffea712
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.NetServices;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.NetVersion;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.RpcModules;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.TxPoolPantheonStatistics;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.TxPoolPantheonTransactions;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.Web3ClientVersion;
import tech.pegasys.pantheon.ethereum.jsonrpc.internal.methods.Web3Sha3;
Expand Down Expand Up @@ -287,7 +288,9 @@ blockchainQueries, new TransactionTracer(blockReplay), parameter),
}
if (rpcApis.contains(RpcApis.TX_POOL)) {
addMethods(
enabledMethods, new TxPoolPantheonTransactions(transactionPool.getPendingTransactions()));
enabledMethods,
new TxPoolPantheonTransactions(transactionPool.getPendingTransactions()),
new TxPoolPantheonStatistics(transactionPool.getPendingTransactions()));
}
if (rpcApis.contains(RpcApis.PERM)) {
addMethods(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
package tech.pegasys.pantheon.ethereum.jsonrpc.internal.results;

import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonGetter;

public class PendingTransactionsStatisticsResult {

Expand All @@ -27,17 +27,17 @@ public PendingTransactionsStatisticsResult(
this.remoteCount = remoteCount;
}

@JsonValue
@JsonGetter
public long getMaxSize() {
return maxSize;
}

@JsonValue
@JsonGetter
public long getLocalCount() {
return localCount;
}

@JsonValue
@JsonGetter
public long getRemoteCount() {
return remoteCount;
}
Expand Down

0 comments on commit ffea712

Please sign in to comment.