Skip to content

Log.BlockTimestamp is 0 for ethclient.BlockReceipts and potentially other methods that return Log #32334

@DenyVeyten

Description

@DenyVeyten

System information

go-ethereum 1.16.1

Expected behaviour

Log.BlockTimestamp is never 0

Actual behaviour

Log.BlockTimestamp is 0 for some eth methods

Steps to reproduce the behaviour

  1. call ethclient.BlockReceipts for any block (https://ethereum-rpc.publicnode.com/ was used as RPC node)
  2. inspect a Log for some Receipt

Workaround

Get block timestamp from Header, e.g. via ethclient.HeaderByNumber Is this the most "lightweight" call as of today to get a timestamp of a block?

Additional info

Probably related #31887 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions