@@ -107,7 +107,6 @@ pub struct DeploymentCreate {
107
107
pub graft_base : Option < DeploymentHash > ,
108
108
pub graft_block : Option < BlockPtr > ,
109
109
pub debug_fork : Option < DeploymentHash > ,
110
- pub has_causality_region : BTreeSet < EntityType > ,
111
110
}
112
111
113
112
impl DeploymentCreate {
@@ -117,12 +116,11 @@ impl DeploymentCreate {
117
116
start_block : Option < BlockPtr > ,
118
117
) -> Self {
119
118
Self {
120
- manifest : SubgraphManifestEntity :: new ( raw_manifest, source_manifest) ,
119
+ manifest : SubgraphManifestEntity :: new ( raw_manifest, source_manifest, Vec :: new ( ) ) ,
121
120
start_block : start_block. cheap_clone ( ) ,
122
121
graft_base : None ,
123
122
graft_block : None ,
124
123
debug_fork : None ,
125
- has_causality_region : BTreeSet :: new ( ) ,
126
124
}
127
125
}
128
126
@@ -139,8 +137,12 @@ impl DeploymentCreate {
139
137
self
140
138
}
141
139
142
- pub fn has_causality_region ( mut self , has_causality_region : BTreeSet < EntityType > ) -> Self {
143
- self . has_causality_region = has_causality_region;
140
+ pub fn entities_with_causality_region (
141
+ mut self ,
142
+ entities_with_causality_region : BTreeSet < EntityType > ,
143
+ ) -> Self {
144
+ self . manifest . entities_with_causality_region =
145
+ entities_with_causality_region. into_iter ( ) . collect ( ) ;
144
146
self
145
147
}
146
148
}
@@ -166,7 +168,6 @@ pub struct SubgraphDeploymentEntity {
166
168
pub reorg_count : i32 ,
167
169
pub current_reorg_depth : i32 ,
168
170
pub max_reorg_depth : i32 ,
169
- pub has_causality_region : Vec < EntityType > ,
170
171
}
171
172
172
173
#[ derive( Debug ) ]
@@ -177,17 +178,23 @@ pub struct SubgraphManifestEntity {
177
178
pub features : Vec < String > ,
178
179
pub schema : String ,
179
180
pub raw_yaml : Option < String > ,
181
+ pub entities_with_causality_region : Vec < EntityType > ,
180
182
}
181
183
182
184
impl SubgraphManifestEntity {
183
- pub fn new ( raw_yaml : String , manifest : & super :: SubgraphManifest < impl Blockchain > ) -> Self {
185
+ pub fn new (
186
+ raw_yaml : String ,
187
+ manifest : & super :: SubgraphManifest < impl Blockchain > ,
188
+ entities_with_causality_region : Vec < EntityType > ,
189
+ ) -> Self {
184
190
Self {
185
191
spec_version : manifest. spec_version . to_string ( ) ,
186
192
description : manifest. description . clone ( ) ,
187
193
repository : manifest. repository . clone ( ) ,
188
194
features : manifest. features . iter ( ) . map ( |f| f. to_string ( ) ) . collect ( ) ,
189
195
schema : manifest. schema . document . clone ( ) . to_string ( ) ,
190
196
raw_yaml : Some ( raw_yaml) ,
197
+ entities_with_causality_region,
191
198
}
192
199
}
193
200
0 commit comments