Skip to content

Commit fc2e08c

Browse files
avoiding disabled lst mints
1 parent 8dd6e97 commit fc2e08c

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/dex-infinity/src/infinity.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ impl DexInterface for InfinityDex {
6868
let lst_mint = lst_data.sol_val_calc.lst_mint();
6969
let account_metas = lst_data.sol_val_calc.ix_accounts();
7070
let num_accounts_for_tx = account_metas.len();
71+
let Ok((lst_state, lst_data)) = amm.find_ready_lst(lst_mint) else {
72+
continue;
73+
};
74+
75+
if lst_state.is_input_disabled!= 0 {
76+
continue;
77+
}
78+
7179
for pk in lst_data.sol_val_calc.get_accounts_to_update() {
7280
let edges = vec![
7381
Arc::new(InfinityEdgeIdentifier {

programs/simulator/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ bincode = "1.3.3"
3535
sha2 = "0.10.8"
3636
base64 = "0.12.3"
3737
litesvm = { git = "https://github.com/blockworks-foundation/litesvm.git", branch = "v0.1.0+solana_1.7" }
38+
tracing = "0.1.37"
39+
tracing-subscriber = "0.3.16"
3840

3941
[profile.test]
4042
inherits = "release"

programs/simulator/tests/cases/test_swap_from_dump.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ async fn test_quote_match_swap_for_infinity() -> anyhow::Result<()> {
7373
}
7474

7575
async fn run_all_swap_from_dump(dump_name: &str) -> Result<Result<(), Error>, Error> {
76+
tracing_subscriber::fmt::init();
77+
7678
let mut skip_count = option_env!("SKIP_COUNT")
7779
.map(|x| u32::from_str(x).unwrap_or(0))
7880
.unwrap_or(0);

0 commit comments

Comments
 (0)