@@ -21,8 +21,10 @@ use graph::{
2121 PruneReporter , PruneRequest , SubgraphFork ,
2222 } ,
2323 } ,
24- data:: query:: QueryTarget ,
25- data:: subgraph:: { schema:: DeploymentCreate , status, DeploymentFeatures } ,
24+ data:: {
25+ query:: QueryTarget ,
26+ subgraph:: { schema:: DeploymentCreate , status, DeploymentFeatures } ,
27+ } ,
2628 internal_error,
2729 prelude:: {
2830 anyhow, lazy_static, o, web3:: types:: Address , ApiVersion , BlockNumber , BlockPtr ,
@@ -1043,13 +1045,15 @@ impl SubgraphStoreInner {
10431045 join_all ( self . stores . values ( ) . map ( |store| store. vacuum ( ) ) ) . await
10441046 }
10451047
1046- pub fn rewind ( & self , id : DeploymentHash , block_ptr_to : BlockPtr ) -> Result < ( ) , StoreError > {
1047- let ( store, site) = self . store ( & id) ?;
1048+ pub fn rewind ( & self , id : DeploymentId , block_ptr_to : BlockPtr ) -> Result < ( ) , StoreError > {
1049+ let site = self . find_site ( id) ?;
1050+ let store = self . for_site ( & site) ?;
10481051 store. rewind ( site, block_ptr_to)
10491052 }
10501053
1051- pub fn truncate ( & self , id : DeploymentHash , block_ptr_to : BlockPtr ) -> Result < ( ) , StoreError > {
1052- let ( store, site) = self . store ( & id) ?;
1054+ pub fn truncate ( & self , id : DeploymentId , block_ptr_to : BlockPtr ) -> Result < ( ) , StoreError > {
1055+ let site = self . find_site ( id) ?;
1056+ let store = self . for_site ( & site) ?;
10531057 store. truncate ( site, block_ptr_to)
10541058 }
10551059
0 commit comments