Skip to content

Commit

Permalink
Fix block polling bug (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmantica11 authored Nov 1, 2024
1 parent 6145d77 commit a4dd65c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ingester/fetchers/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ pub fn get_grpc_stream_with_rpc_fallback(
panic!("gRPC stream ended unexpectedly");
}
Either::Right((Some(rpc_blocks), _)) => {
let rpc_blocks: Vec<BlockInfo> = rpc_blocks
.into_iter()
.filter(|b| b.metadata.slot > last_indexed_slot)
.collect();
let blocks_len = rpc_blocks.len();
let parent_slot = rpc_blocks.first().unwrap().metadata.parent_slot;
let last_slot = rpc_blocks.last().unwrap().metadata.slot;
Expand Down

0 comments on commit a4dd65c

Please sign in to comment.