aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-15 20:18:31 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-15 20:18:31 +0800
commitaa250e228a7f2eec5d512d05eb042b75e2755d30 (patch)
tree730df04d1439ddc089798a9da5b00ab849b95494 /eth
parentcf7c44a7f6e5422148e0be98186d5570ce3e0ac5 (diff)
downloaddexon-aa250e228a7f2eec5d512d05eb042b75e2755d30.tar
dexon-aa250e228a7f2eec5d512d05eb042b75e2755d30.tar.gz
dexon-aa250e228a7f2eec5d512d05eb042b75e2755d30.tar.bz2
dexon-aa250e228a7f2eec5d512d05eb042b75e2755d30.tar.lz
dexon-aa250e228a7f2eec5d512d05eb042b75e2755d30.tar.xz
dexon-aa250e228a7f2eec5d512d05eb042b75e2755d30.tar.zst
dexon-aa250e228a7f2eec5d512d05eb042b75e2755d30.zip
eth: don't refetch non fitting blocks to avoid duplicates
Diffstat (limited to 'eth')
-rw-r--r--eth/sync.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/eth/sync.go b/eth/sync.go
index 917fc0fce..a3b177a4d 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -214,7 +214,7 @@ func (pm *ProtocolManager) fetcher() {
if announce := pending[hash]; announce != nil {
// Drop the block if it surely cannot fit
if pm.chainman.HasBlock(hash) || !pm.chainman.HasBlock(block.ParentHash()) {
- delete(pending, hash)
+ // delete(pending, hash) // if we drop, it will re-fetch it, wait for timeout?
continue
}
// Otherwise accumulate for import