Skip to content

eth/filters: fix TestInvalidGetLogsRequest #31877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ceyonur
Copy link
Contributor

@ceyonur ceyonur commented May 22, 2025

Seems tests were actually returning not found error and test cases are actually not correct as implementation never returns err for those cases.

This PR correctly populates the DB and adheres the fixes test cases

@ceyonur ceyonur requested a review from rjl493456442 as a code owner May 22, 2025 14:30
@fjl fjl changed the title filters: fix TestInvalidGetLogsRequest eth/filters: fix TestInvalidGetLogsRequest May 23, 2025
// Reason: Cannot specify both BlockHash and FromBlock/ToBlock)
testCases := []FilterCriteria{
0: {BlockHash: &blockHash, FromBlock: big.NewInt(100)},
1: {BlockHash: &blockHash, ToBlock: big.NewInt(500)},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these tests were just meant to check that FromBlock/ToBlock is mutually exclusive with BlockHash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it does not actually return any error for these cases in the GetLogs (there is an if/else check)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants