Skip to content

Commit 5202660

Browse files
committed
engine: return -38003 for FCUv2 payloadAttributes mismatch
1 parent 9e5e39a commit 5202660

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext)
184184
if (!getWithdrawalsValidator(
185185
protocolSchedule.get(), newHead, maybePayloadAttributes.get().getTimestamp())
186186
.validateWithdrawals(withdrawals)) {
187-
return new JsonRpcErrorResponse(requestId, RpcErrorType.INVALID_WITHDRAWALS_PARAMS);
187+
return new JsonRpcErrorResponse(requestId, getInvalidPayloadAttributesError());
188188
}
189189
}
190190

ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdatedV1.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,9 @@ protected boolean requireTerminalPoWBlockValidation() {
5757
protected RpcErrorType getInvalidParametersError() {
5858
return RpcErrorType.INVALID_PAYLOAD_ATTRIBUTES;
5959
}
60+
61+
@Override
62+
protected RpcErrorType getInvalidPayloadAttributesError() {
63+
return RpcErrorType.INVALID_WITHDRAWALS_PARAMS;
64+
}
6065
}

ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdatedV2Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ protected String getMethodName() {
9393

9494
@Override
9595
protected RpcErrorType expectedInvalidPayloadError() {
96-
return RpcErrorType.INVALID_WITHDRAWALS_PARAMS;
96+
return RpcErrorType.INVALID_PAYLOAD_ATTRIBUTES;
9797
}
9898
}

0 commit comments

Comments
 (0)