elixir-omg
elixir-omg copied to clipboard
Add block.eth_hash to /block.all
Block explorer includes the following user story (BE Issue 36)
As a user I would like to see a list of most recent blocks with their associated ETH
tx_hash
.
#1168 introduced /block.all
but without eth_hash
. For this, we need to add eth_hash
to /blocks.all
's response.
Currently the blocks are not associated with their ethereum tx hash so we need to retrieve and persist that to DB as well.
Current response format:
# /block.all
{
"blknum": 92000,
"eth_height": 5364313,
"hash": "0x87c39b60f49c18d5366d7c04b9de0d87d8b5a83dd2a4e03162a74e4aa449b483",
"timestamp": 1572603821
}
Desired response format:
# /block.all
{
"blknum": 92000,
"eth_height": 5364313,
"hash": "0x87c39b60f49c18d5366d7c04b9de0d87d8b5a83dd2a4e03162a74e4aa449b483",
"eth_hash": "0xb6517fc9a89015e99c3e1bf358650cd16969e0766ec89602c4a85355cf776680",
"timestamp": 1572603821,
}