Skip to content

Commit

Permalink
add range test covering both neg accum cases (spread and incentives) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpinYukseloglu authored Aug 5, 2023
1 parent e5b8273 commit 962220f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions x/concentrated-liquidity/position_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2462,6 +2462,15 @@ func (s *KeeperTestSuite) TestMultipleRanges() {
},
rangeTestParams: DefaultRangeTestParams,
},
"two adjacent ranges (flipped order)": {
// Note: this setup covers both edge cases where initial interval accumulation is negative
// for spread rewards and incentives
tickRanges: [][]int64{
{10000, 20000},
{-10000, 10000},
},
rangeTestParams: DefaultRangeTestParams,
},
"two adjacent ranges with current tick smaller than both": {
tickRanges: [][]int64{
{-10000, 10000},
Expand Down

0 comments on commit 962220f

Please sign in to comment.