Skip to content
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

Add missing mixHash field for eth_getBlockBy* JSON RPC endpoints #1098

Merged
merged 3 commits into from
Jun 17, 2020

Conversation

AbdelStark
Copy link
Contributor

@AbdelStark AbdelStark commented Jun 17, 2020

PR description

Add missing mixHash field for eth_getBlockBy* JSON RPC endpoints.
Affected JSON RPC endpoints:

  • eth_getBlockByHash
  • eth_getBlockByNumber

Testing

Item Manual tests Unit tests
eth_getBlockByHash * *
eth_getBlockByNumber * *

Updated test specification files:

  • eth_getBlockByNumber_complete.json: added expected mixHash json field in response.
  • eth_getBlockByNumber_hashes.json: added expected mixHash json field in response.

Sample response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x2",
    "hash": "0x6d5fef8800e21e32e57132672dfa0afd2d893ac0fee2f21f59e5fc287dae1bba",
    "mixHash": "0xa8dc926337449743bc58dd06c7eef1a67f7e55c00e89f17e3df374bf9c0b3ec0",
    "parentHash": "0x5311ed4d6103d6768a67df8710ef9b4f440f4af2dcd244e76fbbdf88d9d98ca2",
    "nonce": "0x92bc85eb7907b85a",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xab61833603912e03fc5f7c977a8f385935423887ba117d4842a990499fed8a4c",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",
    "difficulty": "0x64",
    "totalDifficulty": "0x100c8",
    "extraData": "0x",
    "size": "0x200",
    "gasLimit": "0x1fffffffffffff",
    "gasUsed": "0x0",
    "timestamp": "0x5ee9d10e",
    "uncles": [],
    "transactions": []
  }
}

Fixed Issue(s)

fixes #1091

Signed-off-by: Abdelhamid Bakhta [email protected]

Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eth_getBlockBy* missing MixHash field
2 participants