Skip to content

Commit

Permalink
02-client routing: function in store provider to return client store (#…
Browse files Browse the repository at this point in the history
…5824)

* add function to return 02-client module store

* review comment
  • Loading branch information
crodriguezvega authored Feb 15, 2024
1 parent 2f9186c commit 61937ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/core/02-client/types/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ func (s storeProvider) ClientStore(ctx sdk.Context, clientID string) storetypes.
clientPrefix := []byte(fmt.Sprintf("%s/%s/", host.KeyClientStorePrefix, clientID))
return prefix.NewStore(ctx.KVStore(s.storeKey), clientPrefix)
}

// ModuleStore returns the 02-client module store
func (s storeProvider) ModuleStore(ctx sdk.Context, clientType string) storetypes.KVStore {
return prefix.NewStore(ctx.KVStore(s.storeKey), host.PrefixedClientStoreKey([]byte(clientType)))
}

0 comments on commit 61937ea

Please sign in to comment.