elixir-omg icon indicating copy to clipboard operation
elixir-omg copied to clipboard

Add block.eth_hash to /block.all

Open unnawut opened this issue 5 years ago • 0 comments

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, 
}

unnawut avatar Dec 23 '19 13:12 unnawut