Skip to content

Commit

Permalink
Merge pull request raydium-io#56 from raydium-io/fix_tick_check
Browse files Browse the repository at this point in the history
fix tick check in open position
  • Loading branch information
0x777A authored Oct 10, 2023
2 parents 6e4639f + 341f186 commit 21bb307
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions programs/amm/src/states/tick_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ pub fn check_tick_array_start_index(
tick_index <= tick_math::MAX_TICK,
ErrorCode::TickUpperOverflow
);
require_eq!(0, tick_index % i32::from(tick_spacing));
let expect_start_index = TickArrayState::get_array_start_index(tick_index, tick_spacing);
require_eq!(tick_array_start_index, expect_start_index);
Ok(())
Expand Down

0 comments on commit 21bb307

Please sign in to comment.