Skip to content

Commit

Permalink
Merge pull request #11 from neutron-org/fix/upgrade-non-deterministic…
Browse files Browse the repository at this point in the history
…-gas

fix: upgrade non deterministic gas
  • Loading branch information
pr0n00gler authored Nov 20, 2023
2 parents 12cd838 + 5a66ac1 commit 28f3db4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/upgrade/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
// skipUpgradeHeightArray is a set of block heights for which the upgrade must be skipped
func BeginBlocker(k *keeper.Keeper, ctx sdk.Context, _ abci.RequestBeginBlock) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)
ctx = ctx.WithBlockGasMeter(sdk.NewInfiniteGasMeter()).WithGasMeter(sdk.NewInfiniteGasMeter())

plan, found := k.GetUpgradePlan(ctx)

Expand Down Expand Up @@ -80,7 +81,6 @@ func BeginBlocker(k *keeper.Keeper, ctx sdk.Context, _ abci.RequestBeginBlock) {

// We have an upgrade handler for this upgrade name, so apply the upgrade
ctx.Logger().Info(fmt.Sprintf("applying upgrade \"%s\" at %s", plan.Name, plan.DueAt()))
ctx = ctx.WithBlockGasMeter(sdk.NewInfiniteGasMeter())
k.ApplyUpgrade(ctx, plan)
return
}
Expand Down

0 comments on commit 28f3db4

Please sign in to comment.