Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Oct 12, 2023
1 parent d60fae5 commit d7c8db8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eth/fetcher/block_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func (f *BlockFetcher) loop() {
}
// Send out all block header requests
for peer, hashes := range request {
log.Trace("Fetching scheduled headers", "peer", peer, "list", hashes)
log.Debug("***** Fetching scheduled headers", "peer", peer, "list", hashes)

// Create a closure of the fetch and schedule in on a new thread
fetchHeader, hashes := f.fetching[hashes[0]].fetchHeader, hashes
Expand All @@ -503,6 +503,7 @@ func (f *BlockFetcher) loop() {

select {
case res := <-resCh:
log.Info("***** Got header response", "hash", hash)
res.Done <- nil
f.FilterHeaders(peer, *res.Res.(*eth.BlockHeadersPacket), time.Now().Add(res.Time))

Expand All @@ -511,6 +512,7 @@ func (f *BlockFetcher) loop() {
// was already rescheduled at this point, we were
// waiting for a catchup. With an unresponsive
// peer however, it's a protocol violation.
log.Info("***** calling dropPeer() due to 10s timeout in fetchHeader request", "hash", hash)
f.dropPeer(peer)
}
}(hash)
Expand Down

0 comments on commit d7c8db8

Please sign in to comment.