les: duplicate downloader and fetcher to allow progressive refactoring

This commit is contained in:
Péter Szilágyi
2021-09-10 10:55:48 +03:00
parent 90987db733
commit 9e17648d8c
27 changed files with 8746 additions and 22 deletions

View File

@ -1248,7 +1248,7 @@ func (s *SyncState) KnownStates() *hexutil.Uint64 {
// - pulledStates: number of state entries processed until now
// - knownStates: number of known state entries that still need to be pulled
func (r *Resolver) Syncing() (*SyncState, error) {
progress := r.backend.Downloader().Progress()
progress := r.backend.SyncProgress()
// Return not syncing if the synchronisation already completed
if progress.CurrentBlock >= progress.HighestBlock {