aboutsummaryrefslogtreecommitdiffstats
path: root/eth/sync.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/sync.go')
-rw-r--r--eth/sync.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/eth/sync.go b/eth/sync.go
index c49f5209d..d955eaa50 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -63,6 +63,9 @@ func (pm *ProtocolManager) processBlocks() error {
max := int(math.Min(float64(len(blocks)), float64(blockProcAmount)))
_, err := pm.chainman.InsertChain(blocks[:max])
if err != nil {
+ // cancel download process
+ pm.downloader.Cancel()
+
return err
}
blocks = blocks[max:]