This repository was archived by the owner on Nov 30, 2021. It is now read-only.
This repository was 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
Description
System info: [Include Ethermint commit, operating system name, and other relevant details]
Steps to reproduce:
- Assuming the block in height
n
only has1
transaction - A developer calls this api in such a parameter
params: [
'0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331',
'0xa' // 10
]
- 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.]