@@ -22,13 +22,14 @@ use graph::{
2222 PruneReporter , PruneRequest , SubgraphFork ,
2323 } ,
2424 } ,
25- data:: query:: QueryTarget ,
26- data:: subgraph:: { schema:: DeploymentCreate , status, DeploymentFeatures } ,
25+ data:: {
26+ query:: QueryTarget ,
27+ subgraph:: { schema:: DeploymentCreate , status, DeploymentFeatures } ,
28+ } ,
2729 internal_error,
28- prelude:: StoreEvent ,
2930 prelude:: {
3031 anyhow, lazy_static, o, ApiVersion , BlockNumber , BlockPtr , ChainStore , DeploymentHash ,
31- EntityOperation , Logger , MetricsRegistry , NodeId , PartialBlockPtr , StoreError ,
32+ EntityOperation , Logger , MetricsRegistry , NodeId , PartialBlockPtr , StoreError , StoreEvent ,
3233 SubgraphDeploymentEntity , SubgraphName , SubgraphStore as SubgraphStoreTrait ,
3334 SubgraphVersionSwitchingMode ,
3435 } ,
@@ -1110,21 +1111,19 @@ impl Inner {
11101111 join_all ( self . stores . values ( ) . map ( |store| store. vacuum ( ) ) ) . await
11111112 }
11121113
1113- pub async fn rewind (
1114- & self ,
1115- id : DeploymentHash ,
1116- block_ptr_to : BlockPtr ,
1117- ) -> Result < ( ) , StoreError > {
1118- let ( store, site) = self . store ( & id) . await ?;
1114+ pub async fn rewind ( & self , id : DeploymentId , block_ptr_to : BlockPtr ) -> Result < ( ) , StoreError > {
1115+ let site = self . find_site ( id) . await ?;
1116+ let store = self . for_site ( & site) ?;
11191117 store. rewind ( site, block_ptr_to) . await
11201118 }
11211119
11221120 pub async fn truncate (
11231121 & self ,
1124- id : DeploymentHash ,
1122+ id : DeploymentId ,
11251123 block_ptr_to : BlockPtr ,
11261124 ) -> Result < ( ) , StoreError > {
1127- let ( store, site) = self . store ( & id) . await ?;
1125+ let site = self . find_site ( id) . await ?;
1126+ let store = self . for_site ( & site) ?;
11281127 store. truncate ( site, block_ptr_to) . await
11291128 }
11301129
0 commit comments