Skip to content

Commit

Permalink
Add back balances_from_state_export_command (#1594)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksandr Bezobchuk <[email protected]>
(cherry picked from commit 74c9bd5)

# Conflicts:
#	cmd/osmosisd/cmd/balances_from_state_export.go
  • Loading branch information
ValarDragon authored and mergify[bot] committed May 26, 2022
1 parent ef21a94 commit bf78a52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/osmosisd/cmd/balances_from_state_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,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.
Expand All @@ -310,9 +310,13 @@ Example:
Add(account.LiquidBalances...).
Add(sdk.NewCoin(appparams.BaseCoinUnit, account.Staked)).
Add(sdk.NewCoin(appparams.BaseCoinUnit, account.UnbondingStake)).
<<<<<<< HEAD:cmd/osmosisd/cmd/balances_from_state_export.go
Add(account.Bonded...).
Add(account.UnclaimedAirdrop...)
snapshotAccs[addr] = account
=======
Add(account.Bonded...)
>>>>>>> 74c9bd5 (Add back balances_from_state_export_command (#1594)):cmd/osmosisd/cmd/balances_from_state_export.go.history
}

snapshot := DeriveSnapshot{
Expand Down
1 change: 1 addition & 0 deletions cmd/osmosisd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,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),
Expand Down

0 comments on commit bf78a52

Please sign in to comment.