Skip to content

Commit

Permalink
bugfix: Increase the timeout for skeleton fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers committed Apr 12, 2023
1 parent 8381a5e commit 8d9ff57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,12 @@ func (d *Downloader) fetchHeaders(p *peerConnection, from uint64) error {
getHeaders := func(from uint64, to uint64) {
request = time.Now()

ttl = d.peers.rates.TargetTimeout()
timeout.Reset(ttl)
if skeleton {
timeout.Reset(1 * time.Minute)
} else {
ttl = d.peers.rates.TargetTimeout()
timeout.Reset(ttl)
}

if skeleton {
// Reset the skeleton headers each time we try to fetch the skeleton.
Expand Down

0 comments on commit 8d9ff57

Please sign in to comment.