Skip to content

Commit ed63cfe

Browse files
Merge pull request #421 from propeller-heads/cluster-test/dc/ENG-5156-dont-execute-when-amount-out-is-zero
fix: Skip execution when amount out is 0
2 parents 823d5d0 + 656183a commit ed63cfe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tycho-integration-test/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,11 @@ async fn process_state(
665665
);
666666
metrics::record_get_amount_out_duration(&component.protocol_system, duration_seconds);
667667

668+
// Sometimes the expected amount out might be zero (e.g. pool is depleted in one direction)
669+
// Then execution will fail with TychoRouter__UndefinedMinAmountOut
670+
if expected_amount_out == BigUint::ZERO {
671+
continue
672+
}
668673
// Simulate execution amount out against the RPC
669674
let (solution, transaction) = match encode_swap(
670675
&component,

0 commit comments

Comments
 (0)