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

Buggy BlockHeader interface #4517

Closed
1 task done
karim-en opened this issue Nov 1, 2021 · 1 comment · Fixed by #4452
Closed
1 task done

Buggy BlockHeader interface #4517

karim-en opened this issue Nov 1, 2021 · 1 comment · Fixed by #4452
Labels
1.x 1.0 related issues Bug Addressing a bug

Comments

@karim-en
Copy link

karim-en commented Nov 1, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The name of the receiptRoot property of the BlockHeader class is not correct.

wiki:
https://eth.wiki/json-rpc/API#:~:text=of%20the%20block.-,receiptsRoot,-%3A

Related issue:
ethereum/go-ethereum#3084

Expected Behavior

we should use receiptsRoot instead of receiptRoot

export interface BlockHeader {
    number: number;
    hash: string;
    parentHash: string;
    nonce: string;
    sha3Uncles: string;
    logsBloom: string;
    transactionRoot: string;
    stateRoot: string;
    receiptsRoot: string;
    miner: string;
    extraData: string;
    gasLimit: number;
    gasUsed: number;
    timestamp: number | string;
    baseFeePerGas?: number;
}

Steps to Reproduce

just call web3.eth.getBlock() and check the returned object

Web3.js Version

1.5.3

Environment

No response

Anything Else?

No response

@karim-en karim-en added the Bug Addressing a bug label Nov 1, 2021
@jdevcs
Copy link
Contributor

jdevcs commented Nov 16, 2021

included in #4445

@jdevcs jdevcs closed this as completed Nov 16, 2021
@jdevcs jdevcs added the 1.x 1.0 related issues label Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Bug Addressing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants