Skip to content

Commit

Permalink
handle all errors
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed May 24, 2022
1 parent 2b089ee commit c46a293
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,7 @@ func (d *Downloader) getFetchHeadersByNumber(p *peerConnection) func(number uint
// the head links match), we do a binary search to find the common ancestor.
func (d *Downloader) findAncestor(p *peerConnection, remoteHeader *types.Header) (uint64, error) {
// Check the validity of chain to be downloaded
// TODO: we can use a mock and
if _, err := d.IsValidChain(remoteHeader, d.getFetchHeadersByNumber(p)); errors.Is(err, whitelist.ErrCheckpointMismatch) {
if _, err := d.IsValidChain(remoteHeader, d.getFetchHeadersByNumber(p)); err != nil {
return 0, err
}

Expand Down

0 comments on commit c46a293

Please sign in to comment.