Skip to content

Commit

Permalink
Fix engine_newPayloadV4 executionRequests serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassaldanha committed Oct 14, 2024
1 parent 6105389 commit 4320eb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ public void newPayloadV4_shouldBuildRequestAndResponseSuccessfully() {
assertThat(((List<Object>) requestData.get("params")).get(2))
.asString()
.isEqualTo(parentBeaconBlockRoot.toHexString());
assertThat(((List<Object>) requestData.get("params")).get(3))
.asInstanceOf(LIST)
.containsExactlyElementsOf(
executionRequests.stream().map(Bytes::toHexString).collect(Collectors.toList()));
}

@TestTemplate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,16 @@ public SafeFuture<Response<PayloadStatusV1>> newPayloadV4(
final List<Bytes> executionRequests) {
final List<String> expectedBlobVersionedHashes =
blobVersionedHashes.stream().map(VersionedHash::toHexString).toList();
final List<String> executionRequestsHexList =
executionRequests.stream().map(Bytes::toHexString).toList();
final Request<?, PayloadStatusV1Web3jResponse> web3jRequest =
new Request<>(
"engine_newPayloadV4",
list(
executionPayload,
expectedBlobVersionedHashes,
parentBeaconBlockRoot.toHexString(),
executionRequests),
executionRequestsHexList),
web3JClient.getWeb3jService(),
PayloadStatusV1Web3jResponse.class);
return web3JClient.doRequest(web3jRequest, EL_ENGINE_BLOCK_EXECUTION_TIMEOUT);
Expand Down

0 comments on commit 4320eb5

Please sign in to comment.