diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 00edd90e1c2bfb3dc1c63c6d131982b0ea02dfba..8a25678d881062d602514323bcd1a1dbb6eb48e2 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -123,6 +123,9 @@ func (ec *Client) getBlock(ctx context.Context, method string, args ...interface if reqs[i].Error != nil { return nil, reqs[i].Error } + if uncles[i] == nil { + return nil, fmt.Errorf("got null header for uncle %d of block %x", i, body.Hash[:]) + } } } return types.NewBlockWithHeader(head).WithBody(body.Transactions, uncles), nil