Skip to content

Commit cc0227e

Browse files
committed
cleanup
1 parent a7bec8b commit cc0227e

File tree

4 files changed

+111
-257
lines changed

4 files changed

+111
-257
lines changed

chain/arweave/src/chain.rs

-50
Original file line numberDiff line numberDiff line change
@@ -147,56 +147,6 @@ impl Blockchain for Chain {
147147
)))
148148
}
149149

150-
// async fn new_firehose_block_stream(
151-
// &self,
152-
// deployment: DeploymentLocator,
153-
// block_cursor: FirehoseCursor,
154-
// start_blocks: Vec<BlockNumber>,
155-
// subgraph_current_block: Option<BlockPtr>,
156-
// filter: Arc<Self::TriggerFilter>,
157-
// unified_api_version: UnifiedMappingApiVersion,
158-
// ) -> Result<Box<dyn BlockStream<Self>>, Error> {
159-
// let adapter = self
160-
// .triggers_adapter(
161-
// &deployment,
162-
// &EmptyNodeCapabilities::default(),
163-
// unified_api_version,
164-
// )
165-
// .unwrap_or_else(|_| panic!("no adapter for network {}", self.name));
166-
167-
// let firehose_endpoint = self.client.firehose_endpoint()?;
168-
// let logger = self
169-
// .logger_factory
170-
// .subgraph_logger(&deployment)
171-
// .new(o!("component" => "FirehoseBlockStream"));
172-
173-
// let firehose_mapper = Arc::new(FirehoseMapper {});
174-
175-
// Ok(Box::new(FirehoseBlockStream::new(
176-
// deployment.hash,
177-
// firehose_endpoint,
178-
// subgraph_current_block,
179-
// block_cursor,
180-
// firehose_mapper,
181-
// adapter,
182-
// filter,
183-
// start_blocks,
184-
// logger,
185-
// self.metrics_registry.clone(),
186-
// )))
187-
// }
188-
189-
// async fn new_polling_block_stream(
190-
// &self,
191-
// _deployment: DeploymentLocator,
192-
// _start_blocks: Vec<BlockNumber>,
193-
// _subgraph_current_block: Option<BlockPtr>,
194-
// _filter: Arc<Self::TriggerFilter>,
195-
// _unified_api_version: UnifiedMappingApiVersion,
196-
// ) -> Result<Box<dyn BlockStream<Self>>, Error> {
197-
// panic!("Arweave does not support polling block stream")
198-
// }
199-
200150
fn chain_store(&self) -> Arc<dyn ChainStore> {
201151
self.chain_store.clone()
202152
}

chain/ethereum/src/chain.rs

-85
Original file line numberDiff line numberDiff line change
@@ -384,91 +384,6 @@ impl Blockchain for Chain {
384384
.await
385385
}
386386

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-
472387
fn chain_store(&self) -> Arc<dyn ChainStore> {
473388
self.chain_store.clone()
474389
}

chain/substreams/src/chain.rs

-11
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,6 @@ impl Blockchain for Chain {
136136
unimplemented!("This chain does not support Dynamic Data Sources. is_refetch_block_required always returns false, this shouldn't be called.")
137137
}
138138

139-
// async fn new_polling_block_stream(
140-
// &self,
141-
// _deployment: DeploymentLocator,
142-
// _start_blocks: Vec<BlockNumber>,
143-
// _subgraph_current_block: Option<BlockPtr>,
144-
// _filter: Arc<Self::TriggerFilter>,
145-
// _unified_api_version: UnifiedMappingApiVersion,
146-
// ) -> Result<Box<dyn BlockStream<Self>>, Error> {
147-
// unimplemented!("this should never be called for substreams")
148-
// }
149-
150139
fn chain_store(&self) -> Arc<dyn ChainStore> {
151140
self.chain_store.clone()
152141
}

0 commit comments

Comments
 (0)