Skip to content

Commit

Permalink
Merge branch to rebase main on dev (#643)
Browse files Browse the repository at this point in the history
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v           ✰  Thanks for creating a PR! You're awesome! ✰
v Please note that maintainers will only review those PRs with a
completed PR template.
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

## Purpose of Changes and their Description

## Link(s) to Ticket(s) or Issue(s) resolved by this PR

## Are these changes tested and documented?

- [ ] If tested, please describe how. If not, why tests are not needed.
- [ ] If documented, please describe where. If not, describe why docs
are not needed.
- [ ] Added to `Unreleased` section of `CHANGELOG.md`?

## Still Left Todo

*Fill this out if this is a Draft PR so others can help.*
  • Loading branch information
kpeluso authored Oct 22, 2024
2 parents f956638 + 7c41fb8 commit 1275941
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions cmd/allorad/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import (
"cosmossdk.io/errors"
"cosmossdk.io/log"
"cosmossdk.io/math"
"github.com/cosmos/cosmos-sdk/types/bech32"

storetypes "cosmossdk.io/store/types"
upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/cometbft/cometbft/crypto"
"github.com/cometbft/cometbft/libs/bytes"
tmos "github.com/cometbft/cometbft/libs/os"
Expand All @@ -23,6 +22,7 @@ import (
"github.com/cosmos/cosmos-sdk/server"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/bech32"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
Expand Down Expand Up @@ -261,6 +261,20 @@ func initAppForTestnet(app *app.AlloraApp, args valArgs) *app.AlloraApp {
}
}

if args.upgradeToTrigger != "" {
upgradePlan := upgradetypes.Plan{
Name: args.upgradeToTrigger,
Height: app.LastBlockHeight() + 10,
Info: "",
Time: time.Time{},
UpgradedClientState: nil,
}
err = app.UpgradeKeeper.ScheduleUpgrade(ctx, upgradePlan)
if err != nil {
tmos.Exit(errors.Wrap(err, "initAppForTestnet(): failed to schedule upgrade").Error())
}
}

return app
}

Expand Down

0 comments on commit 1275941

Please sign in to comment.