-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: enhanced eth_getLogs with timestamp range validation and new er…
…ror handling (#3431) * fix: returned empty array for eth_getLogs if toBlock is not found Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * feat: added new predefined error TIMESTAMP_RANGE_TOO_LARGE Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * fix: added validation to ensure the timestamp range between fromBlock and toBlock is valid Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * chore: added comments to clarify the logic Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * test: added unit test Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * test: added acceptance test Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * chore: updated a unique JsonRPC error code for TIMESTAMP_RANGE_TOO_LARGE Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * chore: updated 7 timestamp validation Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * chore: explained the logic behind MISSING_FROM_BLOCK_PARAM error Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * feat: added a dedicated validateBlockRange for eth_newFilter Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> * fix: threw INVALID_BLOCK_RANGE if fromBlockNum is greater than toBlockNum Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com> --------- Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
- Loading branch information
1 parent
373f1dc
commit 0179a87
Showing
7 changed files
with
188 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
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
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
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