Skip to content

Commit

Permalink
fixed dumb error in truncating an error return by changing to nil
Browse files Browse the repository at this point in the history
  • Loading branch information
kiltsonfire committed Jul 21, 2022
1 parent e97d760 commit 555fc31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty
// Make sure the peer gave us at least one and at most the requested headers
headers := packet.(*headerPack).headers
if len(headers) == 0 || len(headers) > fetch {
return nil, nil, fmt.Errorf("%w: returned headers %d != requested %d", nil, len(headers), fetch)
return nil, nil, nil
}
// The first header needs to be the head, validate against the checkpoint
// and request. If only 1 header was returned, make sure there's no pivot
Expand Down

0 comments on commit 555fc31

Please sign in to comment.