From 976f8f632d6faac3fc1f4d9b4c998d954b3dbb4e Mon Sep 17 00:00:00 2001 From: rhuairahrighairigh Date: Fri, 8 May 2020 16:10:59 +0100 Subject: [PATCH] remove todo - leave to caller to deal with panic --- x/auction/keeper/keeper.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/auction/keeper/keeper.go b/x/auction/keeper/keeper.go index d9756357..6dc09704 100644 --- a/x/auction/keeper/keeper.go +++ b/x/auction/keeper/keeper.go @@ -74,7 +74,6 @@ func (k Keeper) IncrementNextAuctionID(ctx sdk.Context) error { func (k Keeper) StoreNewAuction(ctx sdk.Context, auction types.Auction) (uint64, error) { newAuctionID, err := k.GetNextAuctionID(ctx) if err != nil { - // TODO: We might want to panic on this condition return 0, err } auction = auction.WithID(newAuctionID) @@ -129,7 +128,7 @@ func (k Keeper) DeleteAuction(ctx sdk.Context, auctionID uint64) { } // InsertIntoByTimeIndex adds an auction ID and end time into the byTime index. -func (k Keeper) InsertIntoByTimeIndex(ctx sdk.Context, endTime time.Time, auctionID uint64) { // TODO make private, and find way to make tests work +func (k Keeper) InsertIntoByTimeIndex(ctx sdk.Context, endTime time.Time, auctionID uint64) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.AuctionByTimeKeyPrefix) store.Set(types.GetAuctionByTimeKey(endTime, auctionID), types.Uint64ToBytes(auctionID)) }