Skip to content

Commit

Permalink
fix: add init logic of module accounts just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeseung-bae committed Mar 12, 2024
1 parent dc1d49e commit 9857302
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion baseapp/block_gas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestBaseApp_BlockGas(t *testing.T) {
txBuilder.SetFeeAmount(feeAmount)
txBuilder.SetGasLimit(txtypes.MaxGasWanted) // tx validation checks that gasLimit can't be bigger than this

privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{6}, []uint64{0}
privs, accNums, accSeqs := []cryptotypes.PrivKey{priv1}, []uint64{8}, []uint64{0}
_, txBytes, err := createTestTx(encCfg.TxConfig, txBuilder, privs, accNums, accSeqs, ctx.ChainID())
require.NoError(t, err)

Expand Down
3 changes: 3 additions & 0 deletions x/foundation/keeper/internal/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func (k Keeper) InitGenesis(ctx sdk.Context, data *foundation.GenesisState) erro

k.SetPool(ctx, data.Pool)

// init module accounts just in case
_ = k.authKeeper.GetModuleAccount(ctx, foundation.ModuleName)
_ = k.authKeeper.GetModuleAccount(ctx, foundation.TreasuryName)
return nil
}

Expand Down

0 comments on commit 9857302

Please sign in to comment.