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
4 changes: 4 additions & 0 deletions fynd-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ alloy = { workspace = true, features = ["sol-types", "signer-local"] }

[features]
test-utils = []
# Per-pool simulation metering: counts and times every `get_amount_out` a solve makes, splits it
# by protocol and by solve pass, and reports it. Off by default — measuring a swap costs two clock
# reads on the hottest path in the solver. With it off, solving calls the panic guard directly.
swap-metrics = []
# Block-step-controller build path: lets a caller release buffered blocks one at
# a time (deterministic stepping). Used by the hindsight monitor; the API is not
# yet stable, so it is opt-in.
Expand Down
10 changes: 2 additions & 8 deletions fynd-core/src/algorithm/bellman_ford.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use super::{
split_primitives::MarketOverrides, Algorithm, AlgorithmConfig, AlgorithmError, NoPathReason,
};
use crate::{
algorithm::sim_guard::GuardedProtocolSim,
algorithm::{paths, sim_guard::GuardedProtocolSim},
derived::{
computation::ComputationRequirements,
types::{SpotPrices, TokenGasPrices},
Expand Down Expand Up @@ -205,13 +205,7 @@ impl BellmanFordAlgorithm {
},
)?;

let market_view = match label.as_ref() {
Some(l) => market
.read_labeled(l)
.await
.map_err(|e| AlgorithmError::Other(e.to_string()))?,
None => market.read().await,
};
let market_view = paths::read_market(&market, label).await?;
let token_map: FxHashMap<NodeIndex, Arc<Token>> = token_nodes
.iter()
.filter_map(|&node| {
Expand Down
2 changes: 2 additions & 0 deletions fynd-core/src/algorithm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ pub mod most_liquid;
pub mod path_frank_wolfe;
pub(crate) mod paths;
pub(crate) mod sim_guard;
pub(crate) mod sim_meter;
pub(crate) mod split_primitives;
pub mod water_fill;

#[cfg(test)]
pub mod split_test_harness;
mod swap_cache;
#[cfg(test)]
pub mod test_utils;

Expand Down
Loading
Loading