From 569719975f3cfa18dc2c227e2b9214cf1900404b Mon Sep 17 00:00:00 2001 From: Peter Fox Date: Thu, 3 Jan 2019 10:00:07 +0000 Subject: [PATCH] Allow processing of sync content whilst it is being downloaded when using a bounded sync --- eth/downloader/downloader.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index e3874a520..de77c9920 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -397,11 +397,7 @@ func (d *Downloader) synchronise(id string, hash common.Hash, td *big.Int, mode return errUnknownPeer } if d.mode == BoundedFullSync { - err := d.syncWithPeerUntil(p, hash, td) - if err == nil { - d.processFullSyncContent() - } - return err + return d.syncWithPeerUntil(p, hash, td) } return d.syncWithPeer(p, hash, td) } @@ -1697,6 +1693,7 @@ func (d *Downloader) syncWithPeerUntil(p *peerConnection, hash common.Hash, td * func() error { return d.fetchBodies(localHeight + 1) }, func() error { return d.fetchReceipts(localHeight + 1) }, // Receipts are only retrieved during fast sync func() error { return d.processHeaders(localHeight+1, pivot, td) }, + d.processFullSyncContent, } return d.spawnSync(fetchers) }