Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
it4rb committed Dec 10, 2024
1 parent bb9cf68 commit 9937b03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pkg/liquidity-source/algebra/integral/ticklens.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ func (d *PoolTracker) getPoolTicksFromSC(ctx context.Context, pool entity.Pool,
// changed, use new value
combined = append(combined, tick)
delete(changedTickMap, t.Index)
} else if changedTickSet.ContainsOne(int64(t.Index)) {
// some changed ticks might be consumed entirely and are not in `changedTickMap`, delete them
logger.Debugf("deleted tick %v %v", pool.Address, t)
} else {
// use old value
combined = append(combined, TickResp{
Expand Down
3 changes: 3 additions & 0 deletions pkg/liquidity-source/algebra/v1/ticklens.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ func (d *PoolTracker) getPoolTicksFromSC(ctx context.Context, pool entity.Pool,
// changed, use new value
combined = append(combined, tick)
delete(changedTickMap, t.Index)
} else if changedTickSet.ContainsOne(int64(t.Index)) {
// some changed ticks might be consumed entirely and are not in `changedTickMap`, delete them
logger.Debugf("deleted tick %v %v", pool.Address, t)
} else {
// use old value
combined = append(combined, TickResp{
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/algebrav1/ticklens.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (d *PoolTracker) getPoolTicksFromSC(ctx context.Context, pool entity.Pool,
delete(changedTickMap, t.Index)
} else if changedTickSet.ContainsOne(int64(t.Index)) {
// some changed ticks might be consumed entirely and are not in `changedTickMap`, delete them
logger.Infof("deleted tick %v %v", pool.Address, t)
logger.Debugf("deleted tick %v %v", pool.Address, t)
} else {
// use old value
combined = append(combined, TickResp{
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/ticklens/ticklens.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func GetPoolTicksFromSC(
delete(changedTickMap, t.Index)
} else if changedTickSet.ContainsOne(int64(t.Index)) {
// some changed ticks might be consumed entirely and are not in `changedTickMap`, delete them
logger.Infof("deleted tick %v %v", pool.Address, t)
logger.Debugf("deleted tick %v %v", pool.Address, t)
} else {
// use old value
combined = append(combined, TickResp{
Expand Down

0 comments on commit 9937b03

Please sign in to comment.