BlockByNumber returns a block from the current canonical chain. If number is nil, the latest known block is returned. Note that loading full blocks requires two requests. Use HeaderByNumber if you don't need all transactions or uncle headers.
(ctx context.Context, number *big.Int)
| 79 | // Note that loading full blocks requires two requests. Use HeaderByNumber |
| 80 | // if you don't need all transactions or uncle headers. |
| 81 | func (c *Client) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) { |
| 82 | return c.getBlock(ctx, "eth_getBlockByNumber", toBlockNumArg(number), true) |
| 83 | } |
| 84 | |
| 85 | type rpcBlock struct { |
| 86 | Hash common.Hash `json:"hash"` |
nothing calls this directly
no test coverage detected