Skip to content

Commit d1590b5

Browse files
colin-axneralbertchon
authored andcommitted
Revert "Save gas on IsFeeEnabled (backport cosmos#2786) (cosmos#2815)"
This reverts commit 4bb451c.
1 parent 845bec9 commit d1590b5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
4242

4343
### Improvements
4444

45-
* (apps/29-fee) [\#2786](https://github.com/cosmos/ibc-go/pull/2786) Save gas by checking key existence with `KVStore`'s `Has` method.
45+
### Features
4646

4747
### Bug Fixes
4848

modules/apps/29-fee/keeper/keeper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (k Keeper) DeleteFeeEnabled(ctx sdk.Context, portID, channelID string) {
121121
// fee enabled flag for the given port and channel identifiers
122122
func (k Keeper) IsFeeEnabled(ctx sdk.Context, portID, channelID string) bool {
123123
store := ctx.KVStore(k.storeKey)
124-
return store.Has(types.KeyFeeEnabled(portID, channelID))
124+
return store.Get(types.KeyFeeEnabled(portID, channelID)) != nil
125125
}
126126

127127
// GetAllFeeEnabledChannels returns a list of all ics29 enabled channels containing portID & channelID that are stored in state

0 commit comments

Comments
 (0)