Skip to content

RPC: erigon_getBlockByTimestamp can return a null result #6408

@zbaylin

Description

@zbaylin

Expected behaviour

I make the following RPC call:

{
  "method": "erigon_getBlockByTimestamp",
  "params": [
    1652387590,
    false
  ],
  "id": 0,
  "jsonrpc": "2.0"
}

and it should return a block.

Actual behaviour

I get

{
  "jsonrpc": "2.0",
  "id": 0,
  "result": null
}

even though if I request the block at that time (0xe144ac) with eth_getBlockByNumber, the block is immediately returned.

If for whatever reason the node can't give me a block for that timestamp, I would expect an error, not result: null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions