Skip to content

Commit

Permalink
remove commented lines
Browse files Browse the repository at this point in the history
  • Loading branch information
antstalepresh authored and codehans committed Jul 17, 2024
1 parent c27a107 commit 641e06c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
39 changes: 0 additions & 39 deletions x/oracle/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,42 +195,3 @@ type (
func (cp CurrencyPair) String() string {
return cp.Base + cp.Quote
}

//-----------------------------------
// DenomID logic

// // GetDenomID gets the id associated to the denom from the store.
// func (k Keeper) GetDenomID(ctx sdk.Context, denom string) (uint64, error) {
// store := ctx.KVStore(k.storeKey)
// b := store.Get(types.GetDenomIDKey(denom))
// if b == nil {
// return 0, errors.Wrap(types.ErrUnknownDenom, denom)
// }

// return sdk.BigEndianToUint64(b), nil
// }

// // SetDenomID sets the id of denom to the store.
// func (k Keeper) SetDenomID(ctx sdk.Context, denom string, id uint64) {
// store := ctx.KVStore(k.storeKey)
// store.Set(types.GetDenomIDKey(denom), sdk.Uint64ToBigEndian(id))
// }

// // DeleteDenomID deletes the id of denom from the store.
// func (k Keeper) DeleteDenomID(ctx sdk.Context, denom string) {
// store := ctx.KVStore(k.storeKey)
// store.Delete(types.GetDenomIDKey(denom))
// }

// // IterateDenomIDs iterates over ids of denoms in the store
// func (k Keeper) IterateDenomIDs(ctx sdk.Context, handler func(denom string, id uint64) (stop bool)) {
// store := ctx.KVStore(k.storeKey)
// iter := storetypes.KVStorePrefixIterator(store, types.SymbolIDKey)
// defer iter.Close()
// for ; iter.Valid(); iter.Next() {
// denom := string(iter.Key()[len(types.SymbolIDKey):])
// if handler(denom, sdk.BigEndianToUint64(iter.Value())) {
// break
// }
// }
// }
9 changes: 0 additions & 9 deletions x/oracle/types/oracle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ func TestVoteExtensionCompress(t *testing.T) {
prices := make(map[uint32][]byte)
for index, rate := range exchangeRates {
id := uint32(index)
// id, err := types.SymbolToID(rate.Denom)
// require.NoError(t, err)
count := 0
newAmount := rate.Amount
for !newAmount.IsZero() {
Expand All @@ -30,9 +28,6 @@ func TestVoteExtensionCompress(t *testing.T) {
for i := 0; i < cuttingDecimals; i++ {
rate.Amount = rate.Amount.QuoInt64(10)
}
// for i := 0; i < cuttingDecimals; i++ {
// rate.Amount = rate.Amount.MulInt64(10)
// }
prices[id] = append(rate.Amount.BigInt().Bytes(), byte(cuttingDecimals))
}
voteExt := types.VoteExtension{
Expand All @@ -42,12 +37,8 @@ func TestVoteExtensionCompress(t *testing.T) {
bz, err := voteExt.Marshal()
require.NoError(t, err)
_ = bz
// require.Len(t, bz, 1241)
// require.Len(t, bz, 776)

compressed, err := voteExt.Compress()
require.NoError(t, err)
_ = compressed
// require.Len(t, compressed, 1205)
// require.Len(t, compressed, 733)
}

0 comments on commit 641e06c

Please sign in to comment.