Skip to content

Commit

Permalink
Start with polling enabled in case gRPC is faulty (helius-labs#201)
Browse files Browse the repository at this point in the history
* Fix polling issue

* Fix
  • Loading branch information
pmantica11 authored Sep 13, 2024
1 parent be25cd7 commit 351cb96
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ingester/fetchers/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ pub fn get_grpc_stream_with_rpc_fallback(
start_latest_slot_updater(rpc_client.clone());
let grpc_stream = get_grpc_block_stream(endpoint, None);
pin_mut!(grpc_stream);
let mut rpc_poll_stream: Option<Pin<Box<dyn Stream<Item = Vec<BlockInfo>> + Send>>> = None;
let mut rpc_poll_stream: Option<Pin<Box<dyn Stream<Item = Vec<BlockInfo>> + Send>>> = Some(
Box::pin(get_poller_block_stream(
rpc_client.clone(),
last_indexed_slot,
max_concurrent_block_fetches,
None,
))
);

// Await either the gRPC stream or the RPC block fetching
loop {
Expand Down

0 comments on commit 351cb96

Please sign in to comment.