Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back balances_from_state_export_command (backport #1594) #1595

Merged
merged 4 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions 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,7 @@ Example:
Add(account.LiquidBalances...).
Add(sdk.NewCoin(appparams.BaseCoinUnit, account.Staked)).
Add(sdk.NewCoin(appparams.BaseCoinUnit, account.UnbondingStake)).
Add(account.Bonded...).
Add(account.UnclaimedAirdrop...)
snapshotAccs[addr] = account
alexanderbez marked this conversation as resolved.
Show resolved Hide resolved
Add(account.Bonded...)
}

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