Skip to content

Commit

Permalink
Merge pull request #71 from ChihuahuaChain/lydia/v3.1.0
Browse files Browse the repository at this point in the history
Lydia/v3.1.0
  • Loading branch information
lydia-pierce authored Oct 31, 2022
2 parents 7c7bff3 + 50aaa65 commit d6e9f55
Show file tree
Hide file tree
Showing 5 changed files with 1,036 additions and 1,036 deletions.
12 changes: 6 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ import (
const (
Bech32Prefix = "chihuahua"
Name = "chihuahua"
v310UpgradeName = "v3.1.0"
v310UpgradeName = "v310"
NodeDir = ".chihuahuad"
)

Expand Down Expand Up @@ -253,7 +253,7 @@ type App struct {
// keepers
AccountKeeper authkeeper.AccountKeeper
AuthzKeeper authzkeeper.Keeper
BankKeeper bankkeeper.Keeper
BankKeeper bankkeeper.BaseKeeper
CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
Expand Down Expand Up @@ -806,10 +806,10 @@ func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {
ctx.Logger().Info("Running revert of tombstoning")
err := upgrades.RevertCosTombstoning(
ctx,
&app.SlashingKeeper,
&app.MintKeeper,
&bankkeeper.BaseKeeper{},
&app.StakingKeeper,
app.SlashingKeeper,
app.MintKeeper,
app.BankKeeper,
app.StakingKeeper,
)
if err != nil {
panic(fmt.Sprintf("failed to revert tombstoning: %s", err))
Expand Down
16 changes: 8 additions & 8 deletions app/upgrades/v3.1.0/cos_patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ var (

func mintLostTokens(
ctx sdk.Context,
bankKeeper *bankkeeper.BaseKeeper,
stakingKeeper *stakingkeeper.Keeper,
mintKeeper *mintkeeper.Keeper,
bankKeeper bankkeeper.BaseKeeper,
stakingKeeper stakingkeeper.Keeper,
mintKeeper mintkeeper.Keeper,
) {
var cosMints []CosMints
err := json.Unmarshal([]byte(recordsJSONString), &cosMints)
Expand Down Expand Up @@ -81,7 +81,7 @@ func mintLostTokens(
}
}

func revertTombstone(ctx sdk.Context, slashingKeeper *slashingkeeper.Keeper) error {
func revertTombstone(ctx sdk.Context, slashingKeeper slashingkeeper.Keeper) error {
cosValAddress, err := sdk.ValAddressFromBech32(cosValidatorAddress)
if err != nil {
panic(fmt.Sprintf("validator address is not valid bech32: %s", cosValAddress))
Expand All @@ -103,10 +103,10 @@ func revertTombstone(ctx sdk.Context, slashingKeeper *slashingkeeper.Keeper) err

func RevertCosTombstoning(
ctx sdk.Context,
slashingKeeper *slashingkeeper.Keeper,
mintKeeper *mintkeeper.Keeper,
bankKeeper *bankkeeper.BaseKeeper,
stakingKeeper *stakingkeeper.Keeper,
slashingKeeper slashingkeeper.Keeper,
mintKeeper mintkeeper.Keeper,
bankKeeper bankkeeper.BaseKeeper,
stakingKeeper stakingkeeper.Keeper,
) error {
err := revertTombstone(ctx, slashingKeeper)
if err != nil {
Expand Down
Loading

0 comments on commit d6e9f55

Please sign in to comment.