Skip to content

Commit

Permalink
fix firstSlot computation for backfill sync
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
etan-status authored and zah committed Feb 14, 2022
1 parent 922a0d2 commit 6849536
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon_chain/sync/sync_manager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 6849536

Please sign in to comment.