From 6849536742411953caac7c4ea5b600eb09b359fc Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Sun, 13 Feb 2022 19:13:18 +0100 Subject: [PATCH] fix `firstSlot` computation for backfill sync When initializing backfill sync, the implementation intends to start at the first unknown slot (`1` before tail). However, an incorrect variable is passed, and backfill sync actually starts at the tail slot instead. This patch corrects this by passing the intended variable. The problem was introduced with the original backfill implementation at #3263. --- beacon_chain/sync/sync_manager.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/sync/sync_manager.nim b/beacon_chain/sync/sync_manager.nim index a5d52773bd..76433010bd 100644 --- a/beacon_chain/sync/sync_manager.nim +++ b/beacon_chain/sync/sync_manager.nim @@ -102,7 +102,7 @@ proc initQueue[A, B](man: SyncManager[A, B]) = firstSlot else: Slot(firstSlot - 1'u64) - man.queue = SyncQueue.init(A, man.direction, firstSlot, lastSlot, + man.queue = SyncQueue.init(A, man.direction, startSlot, lastSlot, man.chunkSize, man.getSafeSlot, man.blockVerifier, 1)