Skip to content

Commit

Permalink
fix(firehose-client): fix chain specification in client
Browse files Browse the repository at this point in the history
  • Loading branch information
suchapalaver committed Oct 21, 2024
1 parent 587fdfa commit a37c8e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/firehose-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ impl FirehoseClient {
) -> Result<impl futures::Stream<Item = FirehoseBeaconBlock>, ClientError> {
let (tx, rx) = tokio::sync::mpsc::channel::<FirehoseBeaconBlock>(8192);

let chain = self.chain;
let client = self.get_streaming_client().await?;

tokio::spawn(async move {
Expand All @@ -81,7 +82,7 @@ impl FirehoseClient {
while blocks < total {
let mut client = client.clone();
let request = create_blocks_streaming_request(
Chain::Ethereum,
chain,
start + blocks,
start + total - 1,
BlocksRequested::All,
Expand Down Expand Up @@ -139,6 +140,7 @@ impl FirehoseClient {
) -> Result<impl futures::Stream<Item = FirehoseEthBlock>, ClientError> {
let (tx, rx) = tokio::sync::mpsc::channel::<FirehoseEthBlock>(8192);

let chain = self.chain;
let client = self.get_streaming_client().await?;

tokio::spawn(async move {
Expand All @@ -147,7 +149,7 @@ impl FirehoseClient {
while blocks < total {
let mut client = client.clone();
let request = create_blocks_streaming_request(
Chain::Ethereum,
chain,
start + blocks,
start + total - 1,
BlocksRequested::All,
Expand Down

0 comments on commit a37c8e8

Please sign in to comment.