From f084fb870965a5d8d8f64103e234a7f9d4812300 Mon Sep 17 00:00:00 2001 From: Dev Ojha Date: Thu, 26 May 2022 21:31:02 +0200 Subject: [PATCH] Add back balances_from_state_export_command --- ..._state_export.go.history => balances_from_state_export.go} | 4 ++-- cmd/osmosisd/cmd/root.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) rename cmd/osmosisd/cmd/{balances_from_state_export.go.history => balances_from_state_export.go} (99%) diff --git a/cmd/osmosisd/cmd/balances_from_state_export.go.history b/cmd/osmosisd/cmd/balances_from_state_export.go similarity index 99% rename from cmd/osmosisd/cmd/balances_from_state_export.go.history rename to cmd/osmosisd/cmd/balances_from_state_export.go index ec95377ffaa..e9fbf225728 100644 --- a/cmd/osmosisd/cmd/balances_from_state_export.go.history +++ b/cmd/osmosisd/cmd/balances_from_state_export.go @@ -270,7 +270,7 @@ Example: } // convert balances to underlying coins and sum up balances to total balance - for addr, account := range snapshotAccs { + for _, account := range snapshotAccs { // All pool shares are in liquid balances OR bonded balances (locked), // therefore underlyingCoinsForSelectPools on liquidBalances + bondedBalances // will include everything that is in one of those two pools. @@ -282,7 +282,7 @@ Example: Add(account.LiquidBalances...). Add(sdk.NewCoin(appparams.BaseCoinUnit, account.Staked)). Add(sdk.NewCoin(appparams.BaseCoinUnit, account.UnbondingStake)). - Add(account.Bonded...). + Add(account.Bonded...) } snapshot := DeriveSnapshot{ diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index a626f0c564b..2304d159b5e 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -148,6 +148,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { InitCmd(osmosis.ModuleBasics, osmosis.DefaultNodeHome), genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, osmosis.DefaultNodeHome), genutilcli.MigrateGenesisCmd(), + ExportDeriveBalancesCmd(), AddGenesisAccountCmd(osmosis.DefaultNodeHome), AddGenesisWasmMsgCmd(osmosis.DefaultNodeHome), genutilcli.GenTxCmd(osmosis.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, osmosis.DefaultNodeHome),