diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceCall.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceCall.java index 7ddd1550ce7..0a2a3f680d5 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceCall.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceCall.java @@ -30,11 +30,11 @@ import org.hyperledger.besu.ethereum.transaction.TransactionSimulator; import org.hyperledger.besu.ethereum.vm.DebugOperationTracer; +import java.util.Optional; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Optional; - public class DebugTraceCall extends AbstractTraceCall { private static final Logger LOG = LoggerFactory.getLogger(DebugTraceCall.class); @@ -58,18 +58,18 @@ protected TraceOptions getTraceOptions(final JsonRpcRequestContext requestContex .orElse(TraceOptions.DEFAULT); } - @Override - protected BlockParameter blockParameter(final JsonRpcRequestContext request) { - final Optional maybeBlockParameter = - request.getOptionalParameter(1, BlockParameter.class); - - if (maybeBlockParameter.isPresent()) { - return maybeBlockParameter.get(); - } + @Override + protected BlockParameter blockParameter(final JsonRpcRequestContext request) { + final Optional maybeBlockParameter = + request.getOptionalParameter(1, BlockParameter.class); - return BlockParameter.LATEST; + if (maybeBlockParameter.isPresent()) { + return maybeBlockParameter.get(); } + return BlockParameter.LATEST; + } + @Override protected PreCloseStateHandler getSimulatorResultHandler( final JsonRpcRequestContext requestContext, final DebugOperationTracer tracer) {