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 status-im#3263.
  • Loading branch information
etan-status committed Feb 13, 2022
1 parent 1a0bcf0 commit 3874528
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 @@ -103,7 +103,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 3874528

Please sign in to comment.