From 5bf2bface51a7789c5b8497fdc19cdab94a6bbd0 Mon Sep 17 00:00:00 2001 From: Matt Nelson <85905982+non-fungible-nelson@users.noreply.github.com> Date: Thu, 16 May 2024 17:08:01 -0400 Subject: [PATCH] Improve tx pool logging in RPC when then pool is not enabled or node not in sync. (#7106) * update tx pool logging when not enabled. Signed-off-by: Matt Nelson <85905982+non-fungible-nelson@users.noreply.github.com> * Spotless Signed-off-by: Matt Nelson <85905982+non-fungible-nelson@users.noreply.github.com> * better wording Co-authored-by: Sally MacFarlane Signed-off-by: Matt Nelson <85905982+non-fungible-nelson@users.noreply.github.com> --------- Signed-off-by: Matt Nelson <85905982+non-fungible-nelson@users.noreply.github.com> Co-authored-by: Sally MacFarlane --- .../ethereum/api/jsonrpc/internal/response/RpcErrorType.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/RpcErrorType.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/RpcErrorType.java index e4644128bc..1b1ee48c0a 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/RpcErrorType.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/response/RpcErrorType.java @@ -33,7 +33,9 @@ public enum RpcErrorType implements RpcMethodError { METHOD_NOT_ENABLED(-32604, "Method not enabled"), // Resource unavailable error - TX_POOL_DISABLED(-32002, "Transaction pool not enabled"), + TX_POOL_DISABLED( + -32002, + "Transaction pool not enabled. (Either txpool explicitly disabled, or node not yet in sync)."), // eth_getBlockByNumber specific error message UNKNOWN_BLOCK(-39001, "Unknown block"),