Skip to content

Commit

Permalink
Upgrade to SDK's latest (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio authored and sabau committed Jun 5, 2019
1 parent f44b317 commit 3e151a1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/slashing"
"github.com/cosmos/cosmos-sdk/x/staking"
"github.com/cosmos/cosmos-sdk/x/staking/expected"
)

// export the state of gaia for a genesis file
Expand Down Expand Up @@ -60,7 +61,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []st
/* Handle fee distribution state. */

// withdraw all validator commission
app.stakingKeeper.IterateValidators(ctx, func(_ int64, val sdk.Validator) (stop bool) {
app.stakingKeeper.IterateValidators(ctx, func(_ int64, val expected.ValidatorI) (stop bool) {
_, _ = app.distrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator())
return false
})
Expand All @@ -82,7 +83,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []st
ctx = ctx.WithBlockHeight(0)

// reinitialize all validators
app.stakingKeeper.IterateValidators(ctx, func(_ int64, val sdk.Validator) (stop bool) {
app.stakingKeeper.IterateValidators(ctx, func(_ int64, val expected.ValidatorI) (stop bool) {

// donate any unwithdrawn outstanding reward fraction tokens to the community pool
scraps := app.distrKeeper.GetValidatorOutstandingRewards(ctx, val.GetOperator())
Expand Down
2 changes: 1 addition & 1 deletion cmd/gaiad/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func InitTestnet(config *tmconfig.Config, cdc *codec.Codec, mbm sdk.ModuleBasicM
valPubKeys[i],
sdk.NewCoin(sdk.DefaultBondDenom, valTokens),
staking.NewDescription(nodeDirName, "", "", ""),
staking.NewCommissionMsg(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()),
staking.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()),
sdk.OneInt(),
)
kb, err := keys.NewKeyBaseFromDir(clientDir)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.12

require (
github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c // indirect
github.com/cosmos/cosmos-sdk v0.28.2-0.20190528134626-c39fa755cb85
github.com/cosmos/cosmos-sdk v0.28.2-0.20190604220658-d322e234253a
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect
github.com/google/gofuzz v1.0.0 // indirect
github.com/gorilla/mux v1.7.2 // indirect
Expand All @@ -17,7 +17,7 @@ require (
github.com/pelletier/go-toml v1.4.0 // indirect
github.com/prometheus/common v0.4.1 // indirect
github.com/prometheus/procfs v0.0.0-20190523193104-a7aeb8df3389 // indirect
github.com/rakyll/statik v0.1.6
github.com/rakyll/statik v0.1.6 // indirect
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v0.0.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8Nz
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cosmos/cosmos-sdk v0.28.2-0.20190528134626-c39fa755cb85 h1:r+JDjjPM4o9XpR0mTannKJ0mG7ud2lzy0urQdbJtz+I=
github.com/cosmos/cosmos-sdk v0.28.2-0.20190528134626-c39fa755cb85/go.mod h1:No7UW0JgQnogs4W0jPetEH8s0gZHvqAr3sRmzyuf0i0=
github.com/cosmos/cosmos-sdk v0.28.2-0.20190604220658-d322e234253a h1:FYagPMARMSdk0RroAVf95AIfKytjvHkTIe+XjS9GmLo=
github.com/cosmos/cosmos-sdk v0.28.2-0.20190604220658-d322e234253a/go.mod h1:BvyNPEYewihHQa092/+OEX5dgLZsV7H2boKkkj1H2wI=
github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8 h1:Iwin12wRQtyZhH6FV3ykFcdGNlYEzoeR0jN8Vn+JWsI=
github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d h1:49RLWk1j44Xu4fjHb6JFYmeUnDORVwHNkDxaQ0ctCVU=
Expand Down
2 changes: 1 addition & 1 deletion lcd_test/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func InitializeTestLCD(t *testing.T, nValidators int, initAddrs []sdk.AccAddress
pubKey,
sdk.NewCoin(sdk.DefaultBondDenom, startTokens),
staking.NewDescription(fmt.Sprintf("validator-%d", i+1), "", "", ""),
staking.NewCommissionMsg(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()),
staking.NewCommissionRates(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()),
sdk.OneInt(),
)
stdSignMsg := txbuilder.StdSignMsg{
Expand Down

0 comments on commit 3e151a1

Please sign in to comment.