Skip to content
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

change eth_getFilterLogs return from nil to empty logs #217

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

bylingo
Copy link

@bylingo bylingo commented Jun 5, 2024

Closes #.

What does this PR do?

From user's feedback, we have found that there is a difference between Erigon and xlayer-node when querying events with eth_eth_getFilterLogs RPC method. When the RPC cannot find the filter ID from user in its own memory, Erigon will return a [] while our xlayer-node will return null. But null leads to a NullPointerException (NPE) in web3j and thus causes a crash on user's program.

This PR changes all null returns into [] empty returns.

Reviewers

Main reviewers:

Codeowner reviewers:

  • @-Alice
  • @-Bob

@bylingo bylingo requested review from giskook and zjg555543 June 5, 2024 07:45
@bylingo bylingo marked this pull request as ready for review June 5, 2024 07:46
@KamiD KamiD merged commit 71dc503 into dev Jun 13, 2024
15 checks passed
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.

3 participants