diff --git a/app/upgrades.go b/app/upgrades.go index 7ec85fdc..7313d776 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -69,6 +69,9 @@ func (app *App) StickyFingers(_ upgradetypes.Plan) { } versionMap, err := app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM) + if err != nil { + app.Logger().Error("Error running migrations: " + err.Error()) + } app.Logger().Info(fmt.Sprintf("post migrate version map: %v", versionMap)) diff --git a/cmd/bcnad/cmd/testnet.go b/cmd/bcnad/cmd/testnet.go index 66439adb..c35b0b35 100644 --- a/cmd/bcnad/cmd/testnet.go +++ b/cmd/bcnad/cmd/testnet.go @@ -157,13 +157,13 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { iterator.Close() // Add our validator to power and last validators store - app.StakingKeeper.SetValidator(ctx, newVal) + app.StakingKeeper.SetValidator(ctx, newVal) //nolint:all err = app.StakingKeeper.SetValidatorByConsAddr(ctx, newVal) if err != nil { tmos.Exit(err.Error()) } - app.StakingKeeper.SetValidatorByPowerIndex(ctx, newVal) - app.StakingKeeper.SetLastValidatorPower(ctx, validator, 0) + app.StakingKeeper.SetValidatorByPowerIndex(ctx, newVal) //nolint:all + app.StakingKeeper.SetLastValidatorPower(ctx, validator, 0) //nolint:all if err := app.StakingKeeper.Hooks().AfterValidatorCreated(ctx, validator); err != nil { tmos.Exit(err.Error()) } @@ -172,10 +172,10 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { // // Initialize records for this validator across all distribution stores - app.DistrKeeper.SetValidatorHistoricalRewards(ctx, validator, 0, distrtypes.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) - app.DistrKeeper.SetValidatorCurrentRewards(ctx, validator, distrtypes.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) - app.DistrKeeper.SetValidatorAccumulatedCommission(ctx, validator, distrtypes.InitialValidatorAccumulatedCommission()) - app.DistrKeeper.SetValidatorOutstandingRewards(ctx, validator, distrtypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) + app.DistrKeeper.SetValidatorHistoricalRewards(ctx, validator, 0, distrtypes.NewValidatorHistoricalRewards(sdk.DecCoins{}, 1)) //nolint:all + app.DistrKeeper.SetValidatorCurrentRewards(ctx, validator, distrtypes.NewValidatorCurrentRewards(sdk.DecCoins{}, 1)) //nolint:all + app.DistrKeeper.SetValidatorAccumulatedCommission(ctx, validator, distrtypes.InitialValidatorAccumulatedCommission()) //nolint:all + app.DistrKeeper.SetValidatorOutstandingRewards(ctx, validator, distrtypes.ValidatorOutstandingRewards{Rewards: sdk.DecCoins{}}) //nolint:all // SLASHING // @@ -187,7 +187,7 @@ func initAppForTestnet(app *app.App, args valArgs) *app.App { StartHeight: app.LastBlockHeight() - 1, Tombstoned: false, } - app.SlashingKeeper.SetValidatorSigningInfo(ctx, newConsAddr, newValidatorSigningInfo) + app.SlashingKeeper.SetValidatorSigningInfo(ctx, newConsAddr, newValidatorSigningInfo) //nolint:all // BANK //