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

internal/ethapi: fix encoding of uncle headers and pending blocks #20460

Merged
merged 1 commit into from
Jan 6, 2020

Conversation

princesinha19
Copy link
Contributor

I have fixed removed the totalDifficulty field from API eth_getUncleByBlockHashAndIndex as suggested in #19024. Also, I have made a change in block number of eth_getBlockByNumber("pending"). Now, block number will be marked null because parity also does the same.

Fixes: #19024 and #19332

@princesinha19
Copy link
Contributor Author

princesinha19 commented Dec 19, 2019

@karalabe @holiman Does this PR solves the issue listed?

@hackmod
Copy link
Contributor

hackmod commented Dec 19, 2019

Please see https://github.com/sammy007/open-ethereum-pool/blob/master/proxy/blocks.go#L52

This change may break some ethash pools behavior like as the open-ethereum-pool(master branch)
but for this reason, the develop branch of the open-ethereum-pool had already been fixed for parity by commit sammy007/open-ethereum-pool@3404046#diff-d445d2a08206e4131616d5505dca14f1L52-L59 (this commit claims only support parity but with the latest geth, eth_getWork also returns the forth height param.

@princesinha19
Copy link
Contributor Author

Okay, @HACKDOM. What about #19024?

@hackmod
Copy link
Contributor

hackmod commented Dec 19, 2019

for parity case, eth.getBlock(block_number-1).totalDifficulty == eth.getUncle(block_number,0).totalDifficulty

@fjl fjl added this to the 1.9.10 milestone Jan 6, 2020
@fjl fjl changed the title rpc: uncle block and pending block fix internal/ethapi: fix encoding of uncle headers and pending blocks Jan 6, 2020
@fjl fjl merged commit 7a509b4 into ethereum:master Jan 6, 2020
@princesinha19 princesinha19 deleted the minor-issues branch January 6, 2020 15:25
holiman added a commit to holiman/go-ethereum that referenced this pull request Feb 3, 2020
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.getUncle returns 0 for totalDifficulty
3 participants