diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerGetMinPriorityFee.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerGetMinPriorityFee.java index 7d1c176193c..8e2630233fd 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerGetMinPriorityFee.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerGetMinPriorityFee.java @@ -37,6 +37,6 @@ public String getName() { public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { return new JsonRpcSuccessResponse( requestContext.getRequest().getId(), - miningParameters.getMinPriorityFeePerGas().toHexString()); + miningParameters.getMinPriorityFeePerGas().toShortHexString()); } } diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerSetMinPriorityFee.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerSetMinPriorityFee.java index b723b08f230..25a47c0abbf 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerSetMinPriorityFee.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerSetMinPriorityFee.java @@ -48,7 +48,8 @@ public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { final Wei minPriorityFeePerGas = Wei.fromHexString(requestContext.getRequiredParameter(0, String.class)); miningParameters.setMinPriorityFeePerGas(minPriorityFeePerGas); - LOG.debug("min priority fee per gas changed to {}", minPriorityFeePerGas); + LOG.debug( + "min priority fee per gas changed to {}", minPriorityFeePerGas.toHumanReadableString()); return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), true); } catch (final IllegalArgumentException invalidJsonRpcParameters) { return new JsonRpcErrorResponse( diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerGetMinPriorityFeeTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerGetMinPriorityFeeTest.java index 9f6a3e34096..4022e10244f 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerGetMinPriorityFeeTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/miner/MinerGetMinPriorityFeeTest.java @@ -39,15 +39,15 @@ public void setUp() { @Test public void shouldReturnMinPriorityFee() { - Wei minPriorityFee = Wei.fromHexString("0x46"); + String minPriorityFee = "0x46"; final JsonRpcRequestContext request = new JsonRpcRequestContext(new JsonRpcRequest("2.0", method.getName(), new Object[] {})); - when(miningParameters.getMinPriorityFeePerGas()).thenReturn(minPriorityFee); + when(miningParameters.getMinPriorityFeePerGas()).thenReturn(Wei.fromHexString(minPriorityFee)); final JsonRpcResponse expected = - new JsonRpcSuccessResponse(request.getRequest().getId(), minPriorityFee.toHexString()); + new JsonRpcSuccessResponse(request.getRequest().getId(), minPriorityFee); final JsonRpcResponse actual = method.response(request); assertThat(actual).usingRecursiveComparison().isEqualTo(expected);