From 2895e3b2abc78df243bc7e8640580f46a61c3b80 Mon Sep 17 00:00:00 2001 From: Anton Gavrilov Date: Tue, 3 Dec 2019 15:59:15 +0100 Subject: [PATCH] Treat only blocks in queue as synced (#11264) --- 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 7eb324a06..cc3755c9d 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(_) => {