Skip to content

Commit 6849536

Browse files
etan-statuszah
authored andcommitted
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.
1 parent 922a0d2 commit 6849536

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beacon_chain/sync/sync_manager.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ proc initQueue[A, B](man: SyncManager[A, B]) =
102102
firstSlot
103103
else:
104104
Slot(firstSlot - 1'u64)
105-
man.queue = SyncQueue.init(A, man.direction, firstSlot, lastSlot,
105+
man.queue = SyncQueue.init(A, man.direction, startSlot, lastSlot,
106106
man.chunkSize, man.getSafeSlot,
107107
man.blockVerifier, 1)
108108

0 commit comments

Comments
 (0)