From 7f36e0ad08345204b4a49812fb98ba27016166a4 Mon Sep 17 00:00:00 2001 From: Jim Fasarakis-Hilliard Date: Thu, 28 Sep 2023 12:31:46 +0300 Subject: [PATCH] Save gas on capability IsInitialized (#4770) --- modules/capability/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/capability/keeper/keeper.go b/modules/capability/keeper/keeper.go index fa345c5164b..8d43fae0b78 100644 --- a/modules/capability/keeper/keeper.go +++ b/modules/capability/keeper/keeper.go @@ -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