Skip to content

Commit

Permalink
Merge pull request #469 from BitCannaGlobal/v4-lint
Browse files Browse the repository at this point in the history
lint fix
  • Loading branch information
RaulBernal authored Nov 22, 2024
2 parents a32349f + 4a29788 commit a05134f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
16 changes: 8 additions & 8 deletions cmd/bcnad/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand All @@ -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
//
Expand All @@ -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
//
Expand Down

0 comments on commit a05134f

Please sign in to comment.