From 129267cc92b6dd505a4ac634907bf67ec6f5f47d Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Fri, 19 Mar 2021 16:20:23 +0100 Subject: [PATCH] Added the possibility of specifying custom genesis accounts and balances inside CLI tests (#8936) Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> --- testutil/network/util.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testutil/network/util.go b/testutil/network/util.go index 4f36d464018c..126ca7e81c42 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -168,14 +168,14 @@ func initGenFiles(cfg Config, genAccounts []authtypes.GenesisAccount, genBalance return err } - authGenState.Accounts = accounts + authGenState.Accounts = append(authGenState.Accounts, accounts...) cfg.GenesisState[authtypes.ModuleName] = cfg.Codec.MustMarshalJSON(&authGenState) // set the balances in the genesis state var bankGenState banktypes.GenesisState cfg.Codec.MustUnmarshalJSON(cfg.GenesisState[banktypes.ModuleName], &bankGenState) - bankGenState.Balances = genBalances + bankGenState.Balances = append(bankGenState.Balances, genBalances...) cfg.GenesisState[banktypes.ModuleName] = cfg.Codec.MustMarshalJSON(&bankGenState) appGenStateJSON, err := json.MarshalIndent(cfg.GenesisState, "", " ")