mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 04:00:05 +00:00
Log error in fetchBlocksFromPeer
(#10959)
* Log error in `fetchBlocksFromPeer` * update case
This commit is contained in:
parent
69350a6a80
commit
8bedaaf0a8
@ -289,9 +289,12 @@ func (f *blocksFetcher) fetchBlocksFromPeer(
|
||||
Step: 1,
|
||||
}
|
||||
for i := 0; i < len(peers); i++ {
|
||||
if blocks, err := f.requestBlocks(ctx, req, peers[i]); err == nil {
|
||||
blocks, err := f.requestBlocks(ctx, req, peers[i])
|
||||
if err == nil {
|
||||
f.p2p.Peers().Scorers().BlockProviderScorer().Touch(peers[i])
|
||||
return blocks, peers[i], err
|
||||
} else {
|
||||
log.WithError(err).Error("Could not request blocks by range")
|
||||
}
|
||||
}
|
||||
return nil, "", errNoPeersAvailable
|
||||
|
Loading…
Reference in New Issue
Block a user