@@ -9,7 +9,7 @@ use crate::subgraph::runner::SubgraphRunner;
99use graph:: blockchain:: block_stream:: { BlockStreamMetrics , TriggersAdapterWrapper } ;
1010use graph:: blockchain:: { Blockchain , BlockchainKind , DataSource , NodeCapabilities } ;
1111use graph:: components:: metrics:: gas:: GasMetrics ;
12- use graph:: components:: store:: WritableStore ;
12+ use graph:: components:: store:: ReadStore ;
1313use graph:: components:: subgraph:: ProofOfIndexingVersion ;
1414use graph:: data:: subgraph:: { UnresolvedSubgraphManifest , SPEC_VERSION_0_0_6 } ;
1515use graph:: data:: value:: Word ;
@@ -204,14 +204,14 @@ impl<S: SubgraphStore> SubgraphInstanceManager<S> {
204204 }
205205 }
206206
207- pub async fn hashes_to_writable_store < C : Blockchain > (
207+ pub async fn hashes_to_read_store < C : Blockchain > (
208208 & self ,
209209 logger : & Logger ,
210210 link_resolver : & Arc < dyn LinkResolver > ,
211211 hashes : Vec < DeploymentHash > ,
212212 max_spec_version : Version ,
213213 is_runner_test : bool ,
214- ) -> anyhow:: Result < Vec < ( DeploymentHash , Arc < dyn WritableStore > ) > > {
214+ ) -> anyhow:: Result < Vec < ( DeploymentHash , Arc < dyn ReadStore > ) > > {
215215 let mut writable_stores = Vec :: new ( ) ;
216216 let subgraph_store = self . subgraph_store . clone ( ) ;
217217
@@ -235,16 +235,16 @@ impl<S: SubgraphStore> SubgraphInstanceManager<S> {
235235 . active_locator ( & hash) ?
236236 . ok_or_else ( || anyhow ! ( "no active deployment for hash {}" , hash) ) ?;
237237
238- let writable_store = subgraph_store
239- . clone ( ) // Clone the Arc again for each iteration
240- . writable (
238+ let readable_store = subgraph_store
239+ . clone ( )
240+ . readable (
241241 logger. clone ( ) ,
242242 loc. id . clone ( ) ,
243243 Arc :: new ( manifest. template_idx_and_name ( ) . collect ( ) ) ,
244244 )
245245 . await ?;
246246
247- writable_stores. push ( ( loc. hash , writable_store ) ) ;
247+ writable_stores. push ( ( loc. hash , readable_store ) ) ;
248248 }
249249
250250 Ok ( writable_stores)
@@ -491,8 +491,8 @@ impl<S: SubgraphStore> SubgraphInstanceManager<S> {
491491
492492 let decoder = Box :: new ( Decoder :: new ( decoder_hook) ) ;
493493
494- let subgraph_data_source_writables = self
495- . hashes_to_writable_store :: < C > (
494+ let subgraph_data_source_read_stores = self
495+ . hashes_to_read_store :: < C > (
496496 & logger,
497497 & link_resolver,
498498 subgraph_ds_source_deployments,
@@ -503,15 +503,15 @@ impl<S: SubgraphStore> SubgraphInstanceManager<S> {
503503
504504 let triggers_adapter = Arc :: new ( TriggersAdapterWrapper :: new (
505505 triggers_adapter,
506- subgraph_data_source_writables . clone ( ) ,
506+ subgraph_data_source_read_stores . clone ( ) ,
507507 ) ) ;
508508
509509 let inputs = IndexingInputs {
510510 deployment : deployment. clone ( ) ,
511511 features,
512512 start_blocks,
513513 end_blocks,
514- source_subgraph_stores : subgraph_data_source_writables ,
514+ source_subgraph_stores : subgraph_data_source_read_stores ,
515515 stop_block,
516516 store,
517517 debug_fork,
0 commit comments