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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Support for `nodes-whitelist` and `accounts-whitelist` will be removed in a futu
- Add `perm_getAccountsAllowlist` as an alternative equivalent to `perm_getAccountsWhitelist`
- Add `perm_addAccountsToAllowlist` as an alternative equivalent to `perm_addAccountsToWhitelist`
- Add `perm_removeAccountsFromAllowlist` as an alternative equivalent to `perm_removeAccountsFromWhitelist`
- Add missing `mixHash` field for `eth_getBlockBy*` JSON RPC endpoints

## 1.4.6

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
@JsonPropertyOrder({
"number",
"hash",
"mixHash",
"parentHash",
"nonce",
"sha3Uncles",
Expand All @@ -51,6 +52,7 @@ public class BlockResult implements JsonRpcResult {

private final String number;
private final String hash;
private final String mixHash;
private final String parentHash;
private final String nonce;
private final String sha3Uncles;
Expand Down Expand Up @@ -89,6 +91,7 @@ public <T extends TransactionResult> BlockResult(
final boolean includeCoinbase) {
this.number = Quantity.create(header.getNumber());
this.hash = header.getHash().toString();
this.mixHash = header.getMixHash().toString();
this.parentHash = header.getParentHash().toString();
this.nonce = Quantity.longToPaddedHex(header.getNonce(), 8);
this.sha3Uncles = header.getOmmersHash().toString();
Expand Down Expand Up @@ -120,6 +123,11 @@ public String getHash() {
return hash;
}

@JsonGetter(value = "mixHash")
public String getMixHash() {
return mixHash;
}

@JsonGetter(value = "parentHash")
public String getParentHash() {
return parentHash;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"result": {
"number": "0x10",
"hash": "0x1878c6f27178250f3d55186a2887b076936599f307d96dabcf331b2ff0a38f0c",
"mixHash": "0xa358a5b5e5faed469d9603e454ace5764cc6da652f22eed5318b40982973d822",
"parentHash": "0x9dcd5e20cc30e48e3635ac3a1c398c2f45ee818fcbc232110878ddf0e936e7ea",
"nonce": "0xdfc50ac1134d764f",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"result": {
"number": "0x10",
"hash": "0x1878c6f27178250f3d55186a2887b076936599f307d96dabcf331b2ff0a38f0c",
"mixHash": "0xa358a5b5e5faed469d9603e454ace5764cc6da652f22eed5318b40982973d822",
"parentHash": "0x9dcd5e20cc30e48e3635ac3a1c398c2f45ee818fcbc232110878ddf0e936e7ea",
"nonce": "0xdfc50ac1134d764f",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
Expand Down