From c1107e4b1ae8c7b67e94289055e10b8c4a5d93e6 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Wed, 27 Sep 2023 22:33:03 -0400 Subject: [PATCH] spotless Signed-off-by: Justin Florentine --- .../engine/AbstractEngineForkchoiceUpdated.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java index 7fddc1ccfbc..8e471e2a113 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java @@ -103,14 +103,13 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext) Optional> withdrawals = Optional.empty(); final BlockHeader newHead = maybeNewHead.get(); if (!isValidForkchoiceState( - forkChoice.getSafeBlockHash(), forkChoice.getFinalizedBlockHash(), newHead)) { + forkChoice.getSafeBlockHash(), forkChoice.getFinalizedBlockHash(), newHead)) { logForkchoiceUpdatedCall(INVALID, forkChoice); return new JsonRpcErrorResponse(requestId, RpcErrorType.INVALID_FORKCHOICE_STATE); } ForkchoiceResult result = - mergeCoordinator.updateForkChoice( - newHead, forkChoice.getFinalizedBlockHash(), forkChoice.getSafeBlockHash()); - + mergeCoordinator.updateForkChoice( + newHead, forkChoice.getFinalizedBlockHash(), forkChoice.getSafeBlockHash()); if (maybePayloadAttributes.isPresent()) { final EnginePayloadAttributesParameter payloadAttributes = maybePayloadAttributes.get(); @@ -164,12 +163,9 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext) Optional.of(forkChoice.getHeadBlockHash() + " is an invalid block"))); } - maybePayloadAttributes.ifPresentOrElse( this::logPayload, () -> LOG.debug("Payload attributes are null")); - - if (result.shouldNotProceedToPayloadBuildProcess()) { if (ForkchoiceResult.Status.IGNORE_UPDATE_TO_OLD_HEAD.equals(result.getStatus())) { logForkchoiceUpdatedCall(VALID, forkChoice);