Blockchain Access BlockByHash returns the given full block. Note that loading full blocks requires two requests. Use HeaderByHash if you don't need all transactions or uncle headers.
(ctx context.Context, hash common.Hash)
| 70 | // Note that loading full blocks requires two requests. Use HeaderByHash |
| 71 | // if you don't need all transactions or uncle headers. |
| 72 | func (c *Client) BlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error) { |
| 73 | return c.getBlock(ctx, "eth_getBlockByHash", hash, true) |
| 74 | } |
| 75 | |
| 76 | // BlockByNumber returns a block from the current canonical chain. If number is nil, the |
| 77 | // latest known block is returned. |