mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 07:45:18 +00:00
kavadist - ensure that fund module account exists on init genesis (#1361)
Co-authored-by: rhuairahrighairigh <ruaridh.odonnell@gmail.com> Co-authored-by: drklee3 <derrick@dlee.dev> Co-authored-by: Kevin Davis <karzak@users.noreply.github.com>
This commit is contained in:
parent
df5861e7ab
commit
f1c37725cc
@ -27,6 +27,12 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, accountKeeper types.AccountKe
|
||||
if moduleAcc == nil {
|
||||
panic(fmt.Sprintf("%s module account has not been set", types.KavaDistMacc))
|
||||
}
|
||||
|
||||
// check if the fund account exists
|
||||
fundModuleAcc := accountKeeper.GetModuleAccount(ctx, types.FundModuleAccount)
|
||||
if fundModuleAcc == nil {
|
||||
panic(fmt.Sprintf("%s module account has not been set", types.FundModuleAccount))
|
||||
}
|
||||
}
|
||||
|
||||
// ExportGenesis export genesis state for cdp module
|
||||
|
Loading…
Reference in New Issue
Block a user