aboutsummaryrefslogtreecommitdiffstats
path: root/eth/sync.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2019-04-16 18:20:38 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-04-17 18:16:15 +0800
commit38f6b8563828e089f1445bc703662e3ec4716fb9 (patch)
treee45588e5dce9994a177188e01b5a427a84c1220b /eth/sync.go
parent78d90c47f753d68c340a970f59338db91a465470 (diff)
downloadgo-tangerine-38f6b8563828e089f1445bc703662e3ec4716fb9.tar
go-tangerine-38f6b8563828e089f1445bc703662e3ec4716fb9.tar.gz
go-tangerine-38f6b8563828e089f1445bc703662e3ec4716fb9.tar.bz2
go-tangerine-38f6b8563828e089f1445bc703662e3ec4716fb9.tar.lz
go-tangerine-38f6b8563828e089f1445bc703662e3ec4716fb9.tar.xz
go-tangerine-38f6b8563828e089f1445bc703662e3ec4716fb9.tar.zst
go-tangerine-38f6b8563828e089f1445bc703662e3ec4716fb9.zip
eth, les, light: enforce CHT checkpoints on fast-sync too
Diffstat (limited to 'eth/sync.go')
-rw-r--r--eth/sync.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/eth/sync.go b/eth/sync.go
index bfcfb6716..3e23c5378 100644
--- a/eth/sync.go
+++ b/eth/sync.go
@@ -188,14 +188,12 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
atomic.StoreUint32(&pm.fastSync, 1)
mode = downloader.FastSync
}
-
if mode == downloader.FastSync {
// Make sure the peer's total difficulty we are synchronizing is higher.
if pm.blockchain.GetTdByHash(pm.blockchain.CurrentFastBlock().Hash()).Cmp(pTd) >= 0 {
return
}
}
-
// Run the sync cycle, and disable fast sync if we've went past the pivot block
if err := pm.downloader.Synchronise(peer.id, pHead, pTd, mode); err != nil {
return