diff --git a/x/mint/abci.go b/x/mint/abci.go index c87f8ef2d..21595b466 100644 --- a/x/mint/abci.go +++ b/x/mint/abci.go @@ -5,8 +5,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/mint/types" ) -// beginBlocker mints new tokens for the previous block. -func beginBlocker(ctx sdk.Context, k Keeper) { +// BeginBlocker mints new tokens for the previous block. +func BeginBlocker(ctx sdk.Context, k Keeper) { // fetch stored minter & params minter := k.GetMinter(ctx) params := k.GetParams(ctx) diff --git a/x/mint/genesis.go b/x/mint/genesis.go index fb07680d3..44e0a5ee1 100644 --- a/x/mint/genesis.go +++ b/x/mint/genesis.go @@ -5,16 +5,16 @@ import ( "github.com/cosmos/cosmos-sdk/x/mint/types" ) -// initGenesis new mint genesis -func initGenesis(ctx sdk.Context, keeper Keeper, supplyKeeper types.SupplyKeeper, data GenesisState) { +// InitGenesis new mint genesis +func InitGenesis(ctx sdk.Context, keeper Keeper, supplyKeeper types.SupplyKeeper, data GenesisState) { keeper.SetMinter(ctx, data.Minter) keeper.SetParams(ctx, data.Params) supplyKeeper.GetModuleAccount(ctx, ModuleName) } -// exportGenesis returns a GenesisState for a given context and keeper. -func exportGenesis(ctx sdk.Context, keeper Keeper) GenesisState { +// ExportGenesis returns a GenesisState for a given context and keeper. +func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState { minter := keeper.GetMinter(ctx) params := keeper.GetParams(ctx) return NewGenesisState(minter, params) diff --git a/x/mint/module.go b/x/mint/module.go index 8e9ca590c..88c03dfea 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -119,7 +119,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data j var genesisState GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - initGenesis(ctx, am.keeper, am.supplyKeeper, genesisState) + InitGenesis(ctx, am.keeper, am.supplyKeeper, genesisState) return []abci.ValidatorUpdate{} } @@ -127,13 +127,13 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONMarshaler, data j // ExportGenesis returns the exported genesis state as raw bytes for the mint // module. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONMarshaler) json.RawMessage { - gs := exportGenesis(ctx, am.keeper) + gs := ExportGenesis(ctx, am.keeper) return cdc.MustMarshalJSON(gs) } // BeginBlock returns the begin blocker for the mint module. func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { - beginBlocker(ctx, am.keeper) + BeginBlocker(ctx, am.keeper) } // EndBlock returns the end blocker for the mint module. It returns no validator