Use sequentialSwaps for cyclical routes
This commit is contained in:
@@ -103,7 +103,9 @@ impl TychoRouterEncoder {
|
|||||||
solution
|
solution
|
||||||
.swaps
|
.swaps
|
||||||
.iter()
|
.iter()
|
||||||
.all(|swap| swap.split == 0.0))
|
.all(|swap| swap.split == 0.0) &&
|
||||||
|
!(solution.given_token == solution.checked_token && solution.swaps.len() > 2))
|
||||||
|
// This is a special case for cyclical swaps
|
||||||
{
|
{
|
||||||
self.single_swap_strategy
|
self.single_swap_strategy
|
||||||
.encode_strategy(solution)?
|
.encode_strategy(solution)?
|
||||||
|
|||||||
Reference in New Issue
Block a user