Skip to content

Commit

Permalink
refactor: add some basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aoudiamoncef committed Oct 17, 2023
1 parent 1ce4dac commit 7007c7c
Show file tree
Hide file tree
Showing 2 changed files with 350 additions and 287 deletions.
18 changes: 12 additions & 6 deletions massa-grpc/src/stream/new_slot_execution_outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ pub(crate) async fn new_slot_execution_outputs(
error!("failed to get filter: {}", err);
// Send the error response back to the client
if let Err(e) = tx.send(Err(err.into())).await {
error!("failed to send back NewBlocks error response: {}", e);
error!(
"failed to send back NewSlotExecutionOutputs error response: {}",
e
);
}
return;
}
Expand Down Expand Up @@ -447,11 +450,14 @@ fn filter_map_exec_output(
}
}

if let (Some(original_operation_ids), Some(origin_operation_id)) = (
execution_event_filter.original_operation_ids.clone(),
event.context.origin_operation_id,
) {
if !original_operation_ids.contains(&origin_operation_id) {
if let Some(original_operation_ids) =
execution_event_filter.original_operation_ids.clone()
{
if let Some(origin_operation_id) = event.context.origin_operation_id {
if !original_operation_ids.contains(&origin_operation_id) {
return false;
}
} else {
return false;
}
}
Expand Down
Loading

0 comments on commit 7007c7c

Please sign in to comment.