Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Aug 21, 2023
1 parent 86a2d96 commit 5c3bd4e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
go-version: "^1.18"
go-version: "1.21"
check-latest: true
env:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}
Expand Down
16 changes: 13 additions & 3 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ func (app *MiniApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [

// withdraw all validator commission
app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) {
_, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, val.GetOperator())
valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator())
if err != nil {
panic(err)
}

_, _ = app.DistrKeeper.WithdrawValidatorCommission(ctx, valBz)
return false
})

Expand Down Expand Up @@ -110,8 +115,13 @@ func (app *MiniApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [

// reinitialize all validators
app.StakingKeeper.IterateValidators(ctx, func(_ int64, val stakingtypes.ValidatorI) (stop bool) {
valBz, err := app.StakingKeeper.ValidatorAddressCodec().StringToBytes(val.GetOperator())
if err != nil {
panic(err)
}

// donate any unwithdrawn outstanding reward fraction tokens to the community pool
scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, val.GetOperator())
scraps, err := app.DistrKeeper.GetValidatorOutstandingRewardsCoins(ctx, valBz)
if err != nil {
panic(err)
}
Expand All @@ -126,7 +136,7 @@ func (app *MiniApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
panic(err)
}

if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator()); err != nil {
if err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, valBz); err != nil {
panic(err)
}
return false
Expand Down
2 changes: 1 addition & 1 deletion cmd/minid/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func initRootCmd(

// add keybase, auxiliary RPC, query, genesis, and tx child commands
rootCmd.AddCommand(
rpc.StatusCommand(),
server.StatusCommand(),
genutilcli.Commands(txConfig, basicManager, app.DefaultNodeHome),
queryCommand(),
txCommand(),
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module github.com/julienrbrt/chain-minimal

go 1.19
go 1.21

toolchain go1.21.0

replace (
Expand Down

0 comments on commit 5c3bd4e

Please sign in to comment.