fix slot number display during sync (#3383)

#3304 introduced a regression to the sync status string displayed in the
status bar; during the main forward sync, the current slot is no longer
reported and always displays as `0`. This patch corrects the computation
to accurately report the current slot once more.
This commit is contained in:
Etan Kissling 2022-02-14 12:04:04 +01:00 committed by GitHub
parent 873a8ec1e6
commit a28900c348
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -591,7 +591,7 @@ proc syncLoop[A, B](man: SyncManager[A, B]) {.async.} =
else: InfiniteDuration
currentSlot = Base10.toString(
if man.queue.kind == SyncQueueKind.Forward:
min(uint64(man.queue.outSlot) - 1'u64, 0'u64)
max(uint64(man.queue.outSlot), 1'u64) - 1'u64
else:
uint64(man.queue.outSlot) + 1'u64
)