From 1f9e119a76147a43649e1605745d5fc80bd3da9e Mon Sep 17 00:00:00 2001 From: Anton Gavrilov Date: Fri, 15 Nov 2019 12:05:42 +0100 Subject: [PATCH] Treat only blocks in queue as synced --- ethcore/sync/src/block_sync.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethcore/sync/src/block_sync.rs b/ethcore/sync/src/block_sync.rs index 7eb324a0689..cc3755c9d37 100644 --- a/ethcore/sync/src/block_sync.rs +++ b/ethcore/sync/src/block_sync.rs @@ -571,6 +571,8 @@ impl BlockDownloader { }, Err(EthcoreError::Import(ImportError::AlreadyQueued)) => { trace_sync!(self, "Block already queued {:?}", h); + // Treat blocks in queue as imported in order not to start retraction too early + imported.insert(h.clone()); self.block_imported(&h, number, &parent); }, Ok(_) => {