|
Ran
|
Files
78
|
Run time
12s
|
Badge
README BADGES
|
push
travis-pro
Fix `panic` because of partially reduced orderbook graph when computing transitive orderbook (#1112) This PR fixes a panic in the `pricegraph` when calculating the transitive orderbook for separate subgraphs, where the market's base token's subgraph contained negative cycles. This would happen because only one of the subgraphs (the quote token's subgraph) would end up completely reduced after computing the overlapping transitive orderbook, while the code assumed that both were completely reduced. This issue was discovered by the pricegraph fuzzing. This PR also moves the `orderbook!` macro to its own module so that it can be reused from the `pricegraph/lib.rs` module for unit tests. ### Test Plan - `git checkout 2c0dad400` to checkout the commit with the failing test and no fix. - `cargo test -p pricegraph` and see that it fails - `git checkout fix-fuzz-crash && cargo test -p pricegraph` and see that it was fixed ### Commit History * add failing unit test * fix unit test * fix use statements for new structure * document pricegraph macro
10072 of 41169 branches covered (24.47%)
Branch coverage included in aggregate %.
2644 of 4328 relevant lines covered (61.09%)
14017.19 hits per line
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|