Merge pull request #191 from blockworks-foundation/use_counting_semaphore_to_poll_blocks

Replacing last_processing_slot with processed slot
This commit is contained in:
galactus 2023-09-08 14:08:35 +02:00 committed by GitHub
commit 9c290bdd17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -180,7 +180,7 @@ pub fn poll_block(
.context("Slot notification channel close")?;
let last_processed_slot = current_slot.load(std::sync::atomic::Ordering::Relaxed);
let last_processed_slot = if last_processed_slot == 0 {
last_processed_slot.saturating_sub(1)
processed_slot.saturating_sub(1)
} else {
last_processed_slot
};