Skip to content

Commit

Permalink
fix: return value for no remote block
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed May 24, 2022
1 parent 01117ac commit 2b089ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/downloader/whitelist/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (w *Service) IsValidChain(remoteHeader *types.Header, fetchHeadersByNumber
}

if len(headers) == 0 {
return true, fmt.Errorf("%w: last checkpoint %d", ErrNoRemoteCheckoint, lastCheckpointBlockNum)
return false, fmt.Errorf("%w: last checkpoint %d", ErrNoRemoteCheckoint, lastCheckpointBlockNum)
}

reqBlockNum := headers[0].Number.Uint64()
Expand Down

0 comments on commit 2b089ee

Please sign in to comment.