From 8709c4aa1b970ecf0ae0ced5e1a29890e7f79068 Mon Sep 17 00:00:00 2001 From: stackman27 Date: Mon, 7 Aug 2023 16:36:05 +0000 Subject: [PATCH] misc cleanup --- app/upgrades/v17/upgrades.go | 1 + x/twap/store.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/upgrades/v17/upgrades.go b/app/upgrades/v17/upgrades.go index 673ae002056..50093a1fe2f 100644 --- a/app/upgrades/v17/upgrades.go +++ b/app/upgrades/v17/upgrades.go @@ -151,6 +151,7 @@ func CreateUpgradeHandler( } } +// FlipTwapSpotPriceRecords flips the denoms and spot price of twap record of a given pool. func FlipTwapSpotPriceRecords(ctx sdk.Context, poolIds []uint64, keepers *keepers.AppKeepers) error { for _, poolId := range poolIds { // check that this is a cl pool diff --git a/x/twap/store.go b/x/twap/store.go index bcfaf813df6..8cdd6aac7d9 100644 --- a/x/twap/store.go +++ b/x/twap/store.go @@ -167,7 +167,6 @@ func (k Keeper) GetAllHistoricalPoolIndexedTWAPsForPoolId(ctx sdk.Context, poolI } // StoreNewRecord stores a record, in both the most recent record store and historical stores. -// NOTE: if it's a new Record make sure to update asset0 and asset1 as well. func (k Keeper) StoreNewRecord(ctx sdk.Context, twap types.TwapRecord) { store := ctx.KVStore(k.storeKey) key := types.FormatMostRecentTWAPKey(twap.PoolId, twap.Asset0Denom, twap.Asset1Denom) @@ -175,7 +174,7 @@ func (k Keeper) StoreNewRecord(ctx sdk.Context, twap types.TwapRecord) { k.StoreHistoricalTWAP(ctx, twap) } -// DeleteOldRecord deletes a record, in both the most recent record store and historical stores. +// DeleteOldRecord deletes a record, in most recent record store func (k Keeper) DeleteOldRecord(ctx sdk.Context, twap types.TwapRecord) { store := ctx.KVStore(k.storeKey) key := types.FormatMostRecentTWAPKey(twap.PoolId, twap.Asset0Denom, twap.Asset1Denom)