-
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 <[email protected]> * feat: added new predefined error TIMESTAMP_RANGE_TOO_LARGE Signed-off-by: Logan Nguyen <[email protected]> * fix: added validation to ensure the timestamp range between fromBlock and toBlock is valid Signed-off-by: Logan Nguyen <[email protected]> * chore: added comments to clarify the logic Signed-off-by: Logan Nguyen <[email protected]> * test: added unit test Signed-off-by: Logan Nguyen <[email protected]> * test: added acceptance test Signed-off-by: Logan Nguyen <[email protected]> * chore: updated a unique JsonRPC error code for TIMESTAMP_RANGE_TOO_LARGE Signed-off-by: Logan Nguyen <[email protected]> * chore: updated 7 timestamp validation Signed-off-by: Logan Nguyen <[email protected]> * chore: explained the logic behind MISSING_FROM_BLOCK_PARAM error Signed-off-by: Logan Nguyen <[email protected]> * feat: added a dedicated validateBlockRange for eth_newFilter Signed-off-by: Logan Nguyen <[email protected]> * fix: threw INVALID_BLOCK_RANGE if fromBlockNum is greater than toBlockNum Signed-off-by: Logan Nguyen <[email protected]> --------- Signed-off-by: Logan Nguyen <[email protected]>
- Loading branch information
1 parent
214f1ef
commit 2c31a0d
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