@@ -384,91 +384,6 @@ impl Blockchain for Chain {
384
384
. await
385
385
}
386
386
387
- // async fn new_firehose_block_stream(
388
- // &self,
389
- // deployment: DeploymentLocator,
390
- // block_cursor: FirehoseCursor,
391
- // start_blocks: Vec<BlockNumber>,
392
- // subgraph_current_block: Option<BlockPtr>,
393
- // filter: Arc<Self::TriggerFilter>,
394
- // unified_api_version: UnifiedMappingApiVersion,
395
- // ) -> Result<Box<dyn BlockStream<Self>>, Error> {
396
- // self.block_stream_builder
397
- // .build_firehose(
398
- // self,
399
- // deployment,
400
- // block_cursor,
401
- // start_blocks,
402
- // subgraph_current_block,
403
- // filter,
404
- // unified_api_version,
405
- // )
406
- // .await
407
- // }
408
-
409
- // async fn new_polling_block_stream(
410
- // &self,
411
- // deployment: DeploymentLocator,
412
- // start_blocks: Vec<BlockNumber>,
413
- // subgraph_current_block: Option<BlockPtr>,
414
- // filter: Arc<Self::TriggerFilter>,
415
- // unified_api_version: UnifiedMappingApiVersion,
416
- // ) -> Result<Box<dyn BlockStream<Self>>, Error> {
417
- // let requirements = filter.node_capabilities();
418
- // let adapter = self
419
- // .triggers_adapter(&deployment, &requirements, unified_api_version.clone())
420
- // .unwrap_or_else(|_| {
421
- // panic!(
422
- // "no adapter for network {} with capabilities {}",
423
- // self.name, requirements
424
- // )
425
- // });
426
-
427
- // let logger = self
428
- // .logger_factory
429
- // .subgraph_logger(&deployment)
430
- // .new(o!("component" => "BlockStream"));
431
- // let chain_store = self.chain_store().clone();
432
- // let chain_head_update_stream = self
433
- // .chain_head_update_listener
434
- // .subscribe(self.name.clone(), logger.clone());
435
-
436
- // // Special case: Detect Celo and set the threshold to 0, so that eth_getLogs is always used.
437
- // // This is ok because Celo blocks are always final. And we _need_ to do this because
438
- // // some events appear only in eth_getLogs but not in transaction receipts.
439
- // // See also ca0edc58-0ec5-4c89-a7dd-2241797f5e50.
440
- // let chain_id = match self.client.as_ref() {
441
- // ChainClient::Rpc(adapter) => {
442
- // adapter
443
- // .cheapest()
444
- // .ok_or(anyhow!("unable to get eth adapter for chan_id call"))?
445
- // .chain_id()
446
- // .await?
447
- // }
448
- // _ => panic!("expected rpc when using polling blockstream"),
449
- // };
450
- // let reorg_threshold = match CELO_CHAIN_IDS.contains(&chain_id) {
451
- // false => self.reorg_threshold,
452
- // true => 0,
453
- // };
454
-
455
- // Ok(Box::new(PollingBlockStream::new(
456
- // chain_store,
457
- // chain_head_update_stream,
458
- // adapter,
459
- // self.node_id.clone(),
460
- // deployment.hash,
461
- // filter,
462
- // start_blocks,
463
- // reorg_threshold,
464
- // logger,
465
- // ENV_VARS.max_block_range_size,
466
- // ENV_VARS.target_triggers_per_block_range,
467
- // unified_api_version,
468
- // subgraph_current_block,
469
- // )))
470
- // }
471
-
472
387
fn chain_store ( & self ) -> Arc < dyn ChainStore > {
473
388
self . chain_store . clone ( )
474
389
}
0 commit comments