good morning!!!!

Skip to content
Snippets Groups Projects
Commit 4cb29bde authored by Felix Lange's avatar Felix Lange
Browse files

ethclient: don't crash if server returns null uncle header

It should never return null for a known uncle, but even if it does
we can't just crash.
parent 2dcf75a7
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment