-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
RPC: "eth_getTransactionByHash" returns a transaction with empty blockHash and blockNumber #608
Comments
For you taylor: I would expect it to look like this: {
"id": 4541,
"jsonrpc": "2.0",
"result": {
"hash": "0x99ab199e1f1ab9d5a08373c4e693d5a71a3ac65d52da5430581ed8b74d5b940a",
"nonce": "0x0",
"blockHash": "0xf447117e1b694ffbeeb43dbe2160549e30adf5da0b8250f9357038c51b907dcd",
"blockNumber": "0x02de",
"transactionIndex": "0x0",
"from": "0x8b09e3535d27ad599d984fd63b1578b6f068f01b",
"to": "0x8b09e3535d27ad599d984fd63b1578b6f068f01b",
"value": "0x2710",
"gas": "0x0186a0",
"gasPrice": "0x015f90",
"input": "0x0"
}
} |
additionally should |
and if the tx is pending |
The missing values are due to the block context being unavailable at the "transaction" level. In the case of Somehow, the RPC needs to be able to look up a transaction hash and return the block number it is contained in. This information can be then added to the output. |
Improving this in the future will allow for cleaning up a bit of legacy code.
sending:
Returns me the transaction but with the following
blockHash
,blockNumber
andtransactionIndex
(?):The transactions are correctly returned using
eth_getTransactionByBlockHashAndIndex
and when inside a block witheth_getBlock
and second parametertrue
.The text was updated successfully, but these errors were encountered: