mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
fix: skip nil peers in GetHeader instead of returning error
This commit is contained in:
parent
888b71b3cf
commit
d5b768c9dc
1 changed files with 1 additions and 1 deletions
|
|
@ -52,7 +52,7 @@ func (d *Downloader) GetHeader(hash common.Hash) (*types.Header, error) {
|
|||
|
||||
for _, peer := range d.peers.peers {
|
||||
if peer == nil {
|
||||
return nil, errors.New("could not find peer")
|
||||
continue
|
||||
}
|
||||
// Found a peer, attempt to retrieve the header whilst blocking and
|
||||
// retry if it fails for whatever reason
|
||||
|
|
|
|||
Loading…
Reference in a new issue