-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(l1): support multiple rpc requests in a single request (#2006)
**Motivation** The hive tests from `engine-withdrawals` were failing with a panic because we were asuming only a single RLPRequest could be received but the test sent an array of requets **Description** Introduce a wrapper struct that contains a `Single` type for single `RPCRequest` and `Multiple` for an array of requests, so serde can deserialize into the correct one. If we have an array of request we execute them sequentially. Then return a json encoded array of responses. The function `rpc_response` was also changed to return `serde_json::Value` because it was returning an incorrect value when using it to create the array of responses. This PR fixes the following tests from `engine-withdrawals`: - "Withdrawals Fork on Block 1 - 1 Block Re-Org" - "Withdrawals Fork on Block 1 - 8 Block Re-Org NewPayload" - "Withdrawals Fork on Block 8 - 10 Block Re-Org NewPayload" - "Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block Re-Org" - "Withdrawals Fork on Canonical Block 8 / Side Block 9 - 10 Block Re-Org" Advances #1586
- Loading branch information
Showing
2 changed files
with
40 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters