Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Get pending block return null. #8839

Closed
adyshimony opened this issue Jun 7, 2018 · 4 comments
Closed

Get pending block return null. #8839

adyshimony opened this issue Jun 7, 2018 · 4 comments
Labels
M6-rpcapi 📣 RPC API. Z7-duplicate 🖨 Issue is a duplicate. Closer should comment with a link to the duplicate.
Milestone

Comments

@adyshimony
Copy link

adyshimony commented Jun 7, 2018

I'm running:

Parity version 1.11.3-beta
Which operating system ubuntu
How installed bash <(curl https://get.parity.io -LK)
Are you fully synchronized? yes
Network ethereum
Did you try to restart the node? yes

Trying to get pending block, return null.
let block = await web3.eth.getBlock('pending') return null


Latest is working good.
let block = await web3.eth.getBlock('latest')

  • same code is running good on another machine with version 1.9.3.

Thanks,

Ady.

@atlanticcrypto
Copy link

They changed the RPC response in 1.11.x - you have to use an earlier version if you want to continue using this functionality (still works with 1.10.6) - or use the 4th parameter from the eth_getWork response.

@adyshimony
Copy link
Author

adyshimony commented Jun 7, 2018

Why to break API? I don't get it... I need to change a lot of places in my code.
Thanks for the info, I will use getWork. BTW this 4th parameter is undocumented.
Also, those are 2 api calls instead of one, bad for performance.

@adyshimony
Copy link
Author

Well I don't get it, latest return the same as pending, what I am missing here?

@Tbaut Tbaut added Z7-duplicate 🖨 Issue is a duplicate. Closer should comment with a link to the duplicate. M6-rpcapi 📣 RPC API. labels Jun 8, 2018
@Tbaut
Copy link
Contributor

Tbaut commented Jun 8, 2018

This is a duplicate. Please comment here if needed: #8703

@Tbaut Tbaut closed this as completed Jun 8, 2018
@5chdn 5chdn added this to the 1.12 milestone Jun 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
M6-rpcapi 📣 RPC API. Z7-duplicate 🖨 Issue is a duplicate. Closer should comment with a link to the duplicate.
Projects
None yet
Development

No branches or pull requests

4 participants