Reduce log noise (#31)
This commit is contained in:
parent
65a7a822bc
commit
2a409c7327
|
@ -3,7 +3,7 @@ use router_config_lib::HotMintsConfig;
|
|||
use solana_program::pubkey::Pubkey;
|
||||
use std::collections::{HashSet, VecDeque};
|
||||
use std::str::FromStr;
|
||||
use tracing::info;
|
||||
use tracing::debug;
|
||||
|
||||
pub struct HotMintsCache {
|
||||
max_count: usize,
|
||||
|
@ -50,11 +50,11 @@ impl HotMintsCache {
|
|||
} else if self.latest_unordered.len() >= self.max_count {
|
||||
let oldest = self.latest_ordered.pop_back().unwrap();
|
||||
self.latest_unordered.remove(&oldest);
|
||||
info!("Removing {} from hot mints", debug_tools::name(&oldest));
|
||||
debug!("Removing {} from hot mints", debug_tools::name(&oldest));
|
||||
}
|
||||
|
||||
if self.latest_unordered.insert(pubkey) {
|
||||
info!("Adding {} to hot mints", debug_tools::name(&pubkey));
|
||||
debug!("Adding {} to hot mints", debug_tools::name(&pubkey));
|
||||
}
|
||||
self.latest_ordered.push_front(pubkey);
|
||||
return;
|
||||
|
|
|
@ -614,7 +614,7 @@ impl Routing {
|
|||
hot_mints: &HashSet<Pubkey>,
|
||||
swap_mode: SwapMode,
|
||||
) {
|
||||
info!("prepare_pruned_edges_and_cleanup_cache started");
|
||||
debug!("prepare_pruned_edges_and_cleanup_cache started");
|
||||
self.path_discovery_cache.write().unwrap().expire_old();
|
||||
|
||||
let (valid_edge_count, out_edges_per_mint_index) = Self::select_best_pools(
|
||||
|
@ -645,7 +645,7 @@ impl Routing {
|
|||
(*writer).1 = out_edges_per_mint_index;
|
||||
}
|
||||
|
||||
info!("prepare_pruned_edges_and_cleanup_cache done");
|
||||
debug!("prepare_pruned_edges_and_cleanup_cache done");
|
||||
}
|
||||
|
||||
fn compute_price_impact(edge: &Arc<Edge>) -> Option<f64> {
|
||||
|
@ -1541,11 +1541,11 @@ impl Routing {
|
|||
let can_try_one_more_hop = max_path_length != self.max_path_length;
|
||||
if !ignore_cache && (used_cached_paths || can_try_one_more_hop) {
|
||||
if used_cached_paths {
|
||||
info!("Invalid cached path, retrying without cache");
|
||||
debug!("Invalid cached path, retrying without cache");
|
||||
let mut cache = self.path_discovery_cache.write().unwrap();
|
||||
cache.invalidate(input_index, output_index, max_accounts);
|
||||
} else {
|
||||
warn!("No path within boundaries, retrying with +1 hop");
|
||||
debug!("No path within boundaries, retrying with +1 hop");
|
||||
}
|
||||
return self.find_best_route(
|
||||
chain_data,
|
||||
|
@ -1560,7 +1560,7 @@ impl Routing {
|
|||
);
|
||||
}
|
||||
|
||||
self.print_debug_data(input_mint, output_mint, max_accounts);
|
||||
// self.print_debug_data(input_mint, output_mint, max_accounts);
|
||||
|
||||
bail!(RoutingError::NoPathBetweenMintPair(
|
||||
input_mint.clone(),
|
||||
|
|
Loading…
Reference in New Issue