From 078ce607c637902fa9bf24dfc70e00ba321b74ef Mon Sep 17 00:00:00 2001 From: Andrew Cheng Date: Wed, 22 Jan 2025 18:22:38 +0800 Subject: [PATCH] Reuse constant INVALID_PARAMS_ERROR_CODE for RpcErrorType.java Magic number "-32602" has been defined in the super interface, so reusing that constant value. Signed-off-by: Andrew Cheng --- .../ethereum/api/jsonrpc/internal/response/RpcErrorType.java | 2 +- 1 file changed, 1 insertion(+), 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 57e09ed5ffb..93c74645dd0 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 @@ -147,7 +147,7 @@ public enum RpcErrorType implements RpcMethodError { // Transaction validation failures NONCE_TOO_LOW(-32001, "Nonce too low"), INVALID_TRANSACTION_SIGNATURE(-32002, "Invalid signature"), - INVALID_TRANSACTION_TYPE(-32602, "Invalid transaction type"), + INVALID_TRANSACTION_TYPE(INVALID_PARAMS_ERROR_CODE, "Invalid transaction type"), INTRINSIC_GAS_EXCEEDS_LIMIT(-32003, "Intrinsic gas exceeds gas limit"), TRANSACTION_UPFRONT_COST_EXCEEDS_BALANCE(-32004, "Upfront cost exceeds account balance"), EXCEEDS_BLOCK_GAS_LIMIT(-32005, "Transaction gas limit exceeds block gas limit"),