aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-19 06:15:05 +0800
committerobscuren <geffobscura@gmail.com>2015-04-19 06:15:05 +0800
commit86ecdcd5ff8c86a5d1c25322230cfcef0a2cfe8d (patch)
tree9caa72bf81f53eae808ed0c1f69e310c9fa8c293
parent71aa5fe8a31bdf12a38e940730e60964bbf4a1c0 (diff)
downloadgo-tangerine-86ecdcd5ff8c86a5d1c25322230cfcef0a2cfe8d.tar
go-tangerine-86ecdcd5ff8c86a5d1c25322230cfcef0a2cfe8d.tar.gz
go-tangerine-86ecdcd5ff8c86a5d1c25322230cfcef0a2cfe8d.tar.bz2
go-tangerine-86ecdcd5ff8c86a5d1c25322230cfcef0a2cfe8d.tar.lz
go-tangerine-86ecdcd5ff8c86a5d1c25322230cfcef0a2cfe8d.tar.xz
go-tangerine-86ecdcd5ff8c86a5d1c25322230cfcef0a2cfe8d.tar.zst
go-tangerine-86ecdcd5ff8c86a5d1c25322230cfcef0a2cfe8d.zip
downloader: reset hashTtl on receive
-rw-r--r--eth/downloader/downloader.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 8f955b483..2d417dcf5 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -211,6 +211,8 @@ out:
for {
select {
case hashes := <-d.hashCh:
+ failureResponse.Reset(hashTtl)
+
var done bool // determines whether we're done fetching hashes (i.e. common hash found)
hashSet := set.New()
for _, hash := range hashes {