More minor cleanup

This commit is contained in:
Aleksandr Bezobchuk 2018-09-26 11:36:26 -04:00 committed by mossid
parent 2aad1bd1b0
commit 67ac8c55b9
3 changed files with 15 additions and 11 deletions

View File

@ -16,7 +16,7 @@ type Keeper struct {
stores map[string]*Store
}
// NewKeeper construct a params keeper
// NewKeeper constructs a params keeper
func NewKeeper(cdc *codec.Codec, key *sdk.KVStoreKey, tkey *sdk.TransientStoreKey) (k Keeper) {
k = Keeper{
cdc: cdc,

View File

@ -5,13 +5,16 @@ import (
"github.com/cosmos/cosmos-sdk/x/params/store"
)
// nolint - reexport
type Store = store.Store
type ReadOnlyStore = store.ReadOnlyStore
type ParamStruct = store.ParamStruct
type KeyFieldPairs = store.KeyFieldPairs
// re-export types from store
type (
Store = store.Store
ReadOnlyStore = store.ReadOnlyStore
ParamStruct = store.ParamStruct
KeyFieldPairs = store.KeyFieldPairs
)
// nolint - reexport
// UnmarshalParamsFromMap deserializes parameters from a given map. It returns
// an error upon failure.
func UnmarshalParamsFromMap(m map[string][]byte, cdc *codec.Codec, ps store.ParamStruct) error {
return store.UnmarshalParamsFromMap(m, cdc, ps)
}

View File

@ -1,13 +1,14 @@
package store
/*
To prevent namespace collision between comsumer modules, we define type
To prevent namespace collision between consumer modules, we define type
"space". A Space can only be generated by the keeper, and the keeper checks
the existence of the space having the same name before generating the
space.
Consumer modules must take a space(via Keeper.Subspace), not the keeper
itself. This isolates each modules from the others and make them modify theparameters safely. Keeper can be treated as master permission for all
subspaces(via Keeper.GetSubspace), so should be passed to proper modules
Consumer modules must take a space (via Keeper.Subspace), not the keeper
itself. This isolates each modules from the others and make them modify the
parameters safely. Keeper can be treated as master permission for all
subspaces (via Keeper.GetSubspace), so should be passed to proper modules
(ex. gov)
*/