Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/processors/src/processors/event_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ where

fn task_identifier(&self, event: &Event) -> TaskId {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
let keys = Vec::<Felt>::cairo_deserialize(&event.data, 0).unwrap_or_else(|e| {
panic!("Expected EventEmitted keys to be well formed: {:?}", e);
});
Expand All @@ -47,6 +48,7 @@ where

fn task_dependencies(&self, event: &Event) -> Vec<TaskId> {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
// selector
event.keys[1].hash(&mut hasher);
vec![hasher.finish()]
Expand Down
1 change: 1 addition & 0 deletions crates/processors/src/processors/register_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ where
};

let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
selector.hash(&mut hasher);
hasher.finish()
}
Expand Down
1 change: 1 addition & 0 deletions crates/processors/src/processors/register_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ where
};

let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
selector.hash(&mut hasher);
hasher.finish()
}
Expand Down
2 changes: 2 additions & 0 deletions crates/processors/src/processors/store_del_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ where

fn task_identifier(&self, event: &Event) -> TaskId {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
event.keys[1].hash(&mut hasher);
event.keys[2].hash(&mut hasher);
hasher.finish()
}

fn task_dependencies(&self, event: &Event) -> Vec<TaskId> {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
event.keys[1].hash(&mut hasher); // Use the model selector to create a unique ID
vec![hasher.finish()] // Return the dependency on the register_model task
}
Expand Down
2 changes: 2 additions & 0 deletions crates/processors/src/processors/store_set_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ where

fn task_identifier(&self, event: &Event) -> TaskId {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
event.keys[1].hash(&mut hasher);
event.keys[2].hash(&mut hasher);
hasher.finish()
}

fn task_dependencies(&self, event: &Event) -> Vec<TaskId> {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
event.keys[1].hash(&mut hasher); // Use the model selector to create a unique ID
vec![hasher.finish()] // Return the dependency on the register_model task
}
Expand Down
2 changes: 2 additions & 0 deletions crates/processors/src/processors/store_update_member.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ where

fn task_identifier(&self, event: &Event) -> TaskId {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
// model selector
event.keys[1].hash(&mut hasher);
// entity id
Expand All @@ -44,6 +45,7 @@ where

fn task_dependencies(&self, event: &Event) -> Vec<TaskId> {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
event.keys[1].hash(&mut hasher); // Use the model selector to create a unique ID
vec![hasher.finish()] // Return the dependency on the register_model task
}
Expand Down
2 changes: 2 additions & 0 deletions crates/processors/src/processors/store_update_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ where

fn task_identifier(&self, event: &Event) -> TaskId {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
// model selector
event.keys[1].hash(&mut hasher);
// entity id
Expand All @@ -42,6 +43,7 @@ where

fn task_dependencies(&self, event: &Event) -> Vec<TaskId> {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
event.keys[1].hash(&mut hasher); // Use the model selector to create a unique ID
vec![hasher.finish()] // Return the dependency on the register_model task
}
Expand Down
1 change: 1 addition & 0 deletions crates/processors/src/processors/upgrade_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ where

fn task_identifier(&self, event: &Event) -> TaskId {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
event.keys[1].hash(&mut hasher); // Use the event selector to create a unique ID
hasher.finish()
}
Expand Down
1 change: 1 addition & 0 deletions crates/processors/src/processors/upgrade_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ where

fn task_identifier(&self, event: &Event) -> TaskId {
let mut hasher = DefaultHasher::new();
event.from_address.hash(&mut hasher);
event.keys[1].hash(&mut hasher); // Use the model selector to create a unique ID
hasher.finish()
}
Expand Down
Loading