Skip to content

Commit

Permalink
Save gas on capability IsInitialized (#4770)
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrisJim authored Sep 28, 2023
1 parent 1e4eb1a commit 7f36e0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/capability/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (k *Keeper) InitMemStore(ctx sdk.Context) {
// IsInitialized returns true if the keeper is properly initialized, and false otherwise.
func (k *Keeper) IsInitialized(ctx sdk.Context) bool {
memStore := ctx.KVStore(k.memKey)
return memStore.Get(types.KeyMemInitialized) != nil
return memStore.Has(types.KeyMemInitialized)
}

// InitializeIndex sets the index to one (or greater) in InitChain according
Expand Down

0 comments on commit 7f36e0a

Please sign in to comment.