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.
This commit is contained in:
Etan Kissling 2022-02-13 19:13:18 +01:00 committed by zah
parent 922a0d264c
commit 6849536742
1 changed files with 1 additions and 1 deletions

View File

@ -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)