Skip to content

eth_getBlockByNumber should return Latest if Pending is None #178

@haardikk21

Description

@haardikk21

At block boundaries, if canonical blocks catch up to the pending state, it clears the pending blocks and sets it to None

If a user requests eth_getBlockByNumber at this point with the pending block tag, they will receive a null which forces them to retry again

Geth's behaviour appears to be to just return the latest block when fetching pending - as L2s dont really have a pending block in non-flashblocks mode anyway due to not having a public mempool. We should match that behavior by falling through to fetching Latest when Pending is None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions