Skip to content

Commit

Permalink
chore: change Keeper.space type to be same with cosmos-sdk
Browse files Browse the repository at this point in the history
Signed-off-by: zemyblue <zemyblue@gmail.com>
  • Loading branch information
zemyblue committed Aug 10, 2022
1 parent ab4739e commit 02cdabe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/params/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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),
}
}

Expand All @@ -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
}
Expand All @@ -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
}

0 comments on commit 02cdabe

Please sign in to comment.