Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

RPC eth_getTransactionByBlockHashAndIndex does not work as expected when querying a non-existent transaction index #807

Open
banishee opened this issue Feb 17, 2021 · 1 comment
Labels
rpc Ethereum JSON-RPC related issues and PRs Status: On Ice Type: User Reported

Comments

@banishee
Copy link

banishee commented Feb 17, 2021

System info: [Include Ethermint commit, operating system name, and other relevant details]

Steps to reproduce:

  1. Assuming the block in height n only has 1 transaction
  2. A developer calls this api in such a parameter
params: [
   '0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331',
   '0xa' // 10
]
  1. The result shows up an undefined error
{Code:-32000, Message:"{\"code\":1,\"log\":\"internal\",\"height\":1680,\"codespace\":\"undefined\"}

Expected behavior: [What you expected to happen]

  • If a developer query an non-existent transaction, it's better for this api to return null rather than an error

Actual behavior: [What actually happened]

Additional info: [Include gist of relevant config, logs, etc.]

@banishee banishee changed the title RPC eth_getTransactionByBlockHashAndIndex does not work as expected RPC eth_getTransactionByBlockHashAndIndex does not work as expected when querying an non-existent transaction index Feb 17, 2021
@banishee banishee changed the title RPC eth_getTransactionByBlockHashAndIndex does not work as expected when querying an non-existent transaction index RPC eth_getTransactionByBlockHashAndIndex does not work as expected when querying a non-existent transaction index Feb 17, 2021
@github-actions
Copy link

github-actions bot commented Apr 4, 2021

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale stale PRs that will be closed if no further action occurs label Apr 4, 2021
@araskachoi araskachoi reopened this Apr 12, 2021
@araskachoi araskachoi reopened this May 10, 2021
@araskachoi araskachoi added Status: On Ice rpc Ethereum JSON-RPC related issues and PRs Type: User Reported labels May 10, 2021
@github-actions github-actions bot removed the stale stale PRs that will be closed if no further action occurs label May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
rpc Ethereum JSON-RPC related issues and PRs Status: On Ice Type: User Reported
Projects
None yet
Development

No branches or pull requests

2 participants