Skip to content

Commit

Permalink
create module account on initGenesis in poa
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeersyst committed Apr 8, 2024
1 parent 75ae124 commit 69dcf72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/poa/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra

am.keeper.InitGenesis(ctx, genState)

// To create module account
am.ak.GetModuleAccount(ctx, am.Name())

return []abci.ValidatorUpdate{}
}

Expand Down
1 change: 1 addition & 0 deletions x/poa/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
// AccountKeeper defines the expected account keeper used for simulations (noalias)
type AccountKeeper interface {
GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI
// Methods imported from account should be defined here
}

Expand Down

0 comments on commit 69dcf72

Please sign in to comment.