From 02cdabebddaf7914c90ce49da7e9fedfc3388a5c Mon Sep 17 00:00:00 2001 From: zemyblue Date: Wed, 10 Aug 2022 13:03:18 +0900 Subject: [PATCH] chore: change `Keeper.space` type to be same with cosmos-sdk Signed-off-by: zemyblue --- x/params/keeper/keeper.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/params/keeper/keeper.go b/x/params/keeper/keeper.go index 9056216ceb..e369cb7313 100644 --- a/x/params/keeper/keeper.go +++ b/x/params/keeper/keeper.go @@ -15,7 +15,7 @@ type Keeper struct { legacyAmino *codec.LegacyAmino key sdk.StoreKey tkey sdk.StoreKey - spaces map[string]types.Subspace + spaces map[string]*types.Subspace } // NewKeeper constructs a params keeper @@ -25,7 +25,7 @@ func NewKeeper(cdc codec.BinaryCodec, legacyAmino *codec.LegacyAmino, key, tkey legacyAmino: legacyAmino, key: key, tkey: tkey, - spaces: make(map[string]types.Subspace), + spaces: make(map[string]*types.Subspace), } } @@ -46,7 +46,7 @@ func (k Keeper) Subspace(s string) types.Subspace { } space := types.NewSubspace(k.cdc, k.legacyAmino, k.key, k.tkey, s) - k.spaces[s] = space + k.spaces[s] = &space return space } @@ -57,5 +57,5 @@ func (k Keeper) GetSubspace(s string) (types.Subspace, bool) { if !ok { return types.Subspace{}, false } - return space, ok + return *space, ok }