Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less warnings #283

Merged
merged 5 commits into from
Dec 13, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ where
let mut merging_context = ResolverContext::new(
provider.clone(),
ctx.clone(),
cancellation_token,
cancellation_token.clone(),
None,
simulation_cache,
);
Expand All @@ -134,11 +134,15 @@ where
Ok((task_id, (sequence_of_orders, task_group)))
}
Err(err) => {
warn!(
group_id = task_id,
err = ?err,
"Error running conflict task for group_idx",
);
// Fast patch/heuristic to fix excessive tracing.
// TODO: Use good errors.
if !cancellation_token.is_cancelled() {
warn!(
group_id = task_id,
err = ?err,
"Error running conflict task for group_idx",
);
}
Err(err)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use alloy_primitives::{utils::format_ether, U256};
use crossbeam_queue::SegQueue;
use itertools::Itertools;
use std::time::Instant;
use tracing::{trace, warn};
use tracing::trace;

use super::{
task::ConflictTask, Algorithm, ConflictGroup, ConflictResolutionResultPerGroup, GroupId,
Expand Down Expand Up @@ -183,16 +183,10 @@ impl ConflictTaskGenerator {
total_profit: group.orders[0].sim_value.coinbase_profit,
sequence_of_orders: vec![(0, group.orders[0].sim_value.coinbase_profit)],
};
if let Err(e) = self
// We ignore the error since it means "receiver disconnected" and we expect the caller will detect the cancellation and stop calling us.
let _ = self
.group_result_sender
.send((group_id, (sequence_of_orders, group.clone())))
{
warn!(
error = ?e,
group_id,
"Failed to send single order result for group",
);
}
.send((group_id, (sequence_of_orders, group.clone())));
}

/// Determines if there are any changes between a new group and an existing group.
Expand Down
Loading