From 9857302cd9ecf8fa002eb50e582665a6fe04baa2 Mon Sep 17 00:00:00 2001 From: "jaeseung.bae" Date: Tue, 12 Mar 2024 21:10:24 +0900 Subject: [PATCH] fix: add init logic of module accounts just in case --- baseapp/block_gas_test.go | 2 +- x/foundation/keeper/internal/genesis.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/baseapp/block_gas_test.go b/baseapp/block_gas_test.go index c831fb21ba..933dde385a 100644 --- a/baseapp/block_gas_test.go +++ b/baseapp/block_gas_test.go @@ -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) diff --git a/x/foundation/keeper/internal/genesis.go b/x/foundation/keeper/internal/genesis.go index a88d6fa6a6..0819dc3cdd 100644 --- a/x/foundation/keeper/internal/genesis.go +++ b/x/foundation/keeper/internal/genesis.go @@ -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 }