Skip to content

Commit

Permalink
Fix logic of get latest fully fetched block from partitions
Browse files Browse the repository at this point in the history
  • Loading branch information
JonoPrest committed Sep 10, 2024
1 parent 655e4d8 commit 0ca00a4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ let hasProcessedToEndblock = (self: t) => {

let hasNoMoreEventsToProcess = (self: t, ~hasArbQueueEvents) => {
!hasArbQueueEvents &&
!self.isFetchingBatch &&
self.fetchState->PartitionedFetchState.queueSize === 0
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ let getLatestFullyFetchedBlock = ({partitions}: t) =>
let partitionBlock = partition->FetchState.getLatestFullyFetchedBlock
switch accum {
| Some({FetchState.blockNumber: blockNumber})
if partitionBlock.blockNumber < blockNumber => accum
if partitionBlock.blockNumber >= blockNumber => accum
| _ => Some(partitionBlock)
}
})
Expand Down

0 comments on commit 0ca00a4

Please sign in to comment.