mirror of https://github.com/poanetwork/quorum.git
Merge pull request #621 from QuorumEngineering/raft-sync-greater-height
Raft: process sync data in parallel to download
This commit is contained in:
commit
70e07d6e10
|
@ -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, //This must be added to clear the buffer of downloaded content as it's being filled
|
||||
}
|
||||
return d.spawnSync(fetchers)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue