Skip to content

Commit

Permalink
fix: correct the export process, using a temporary cosmos-sdk patch
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Jun 28, 2020
1 parent 3489a6e commit db139c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cosmic-swingset/app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/distribution/types"
"github.com/cosmos/cosmos-sdk/x/slashing"
"github.com/cosmos/cosmos-sdk/x/staking"
)
Expand Down Expand Up @@ -61,7 +62,7 @@ func (app *AgoricApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []
// withdraw all validator commission
app.stakingKeeper.IterateValidators(ctx, func(_ int64, val staking.ValidatorI) (stop bool) {
_, err := app.distrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator())
if err != nil {
if err != nil && err != types.ErrNoValidatorCommission {
log.Fatal(err)
}
return false
Expand Down
4 changes: 4 additions & 0 deletions packages/cosmic-swingset/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ require (
replace github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4

replace github.com/Agoric/agoric-sdk => ../..

// Need this to fix https://github.com/cosmos/cosmos-sdk/issues/6528
// FIXME: Remove these lines when the bug is fixed upstream in a version we can upgrade to.
replace github.com/cosmos/cosmos-sdk => github.com/agoric-labs/cosmos-sdk v0.0.0-20200628000041-4699b719b4ff
2 changes: 2 additions & 0 deletions packages/cosmic-swingset/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9
github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA=
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/agoric-labs/cosmos-sdk v0.0.0-20200628000041-4699b719b4ff h1:KXDyssuWktP68jBoSQ0oXYPBLA8gGEDzc77zCiqY/3A=
github.com/agoric-labs/cosmos-sdk v0.0.0-20200628000041-4699b719b4ff/go.mod h1:T3u1b0ahtqJpdI2Fk6JcmntR7/YLjMq+J6hZrHPZTzc=
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20200428210309-3cf84258cc12 h1:xnDgoo7cqnbvMFXp7QYrNwYPpAe0wtBuVSkG40PHb1U=
github.com/agoric-labs/cosmos-sdk v0.34.4-0.20200428210309-3cf84258cc12/go.mod h1:tvCen72hkJxkYT1/CsOaKHjZ4PouX4Isp4w9aRL2K4c=
github.com/agoric-labs/cosmos-sdk v0.37.0 h1:y9OTnnORhLHPnfxLIaK4Pv/7Z7KcpnbTxpE5xxWlUUY=
Expand Down

0 comments on commit db139c3

Please sign in to comment.