Skip to content

Commit 5079d96

Browse files
committed
apollo_gateway: create method get_compiled_classes_from_client
1 parent 74c6a23 commit 5079d96

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

crates/apollo_gateway/src/sync_state_reader.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ impl SyncStateReader {
9494

9595
Ok(contract_class)
9696
}
97-
}
9897

99-
impl FetchCompiledClasses for SyncStateReader {
100-
fn get_compiled_classes(&self, class_hash: ClassHash) -> StateResult<CompiledClasses> {
98+
fn get_compiled_classes_from_client(
99+
&self,
100+
class_hash: ClassHash,
101+
) -> StateResult<CompiledClasses> {
101102
let contract_class = self.get_contract_class_from_client(class_hash)?;
102103
match contract_class {
103104
ContractClass::V1(casm_contract_class) => {
@@ -118,6 +119,12 @@ impl FetchCompiledClasses for SyncStateReader {
118119
}
119120
}
120121
}
122+
}
123+
124+
impl FetchCompiledClasses for SyncStateReader {
125+
fn get_compiled_classes(&self, class_hash: ClassHash) -> StateResult<CompiledClasses> {
126+
self.get_compiled_classes_from_client(class_hash)
127+
}
121128

122129
/// Returns whether the given Cairo1 class is declared.
123130
fn is_declared(&self, class_hash: ClassHash) -> StateResult<bool> {

0 commit comments

Comments
 (0)