Skip to content

Commit

Permalink
fix upgrade module to use infinite gas meter for boot operations
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Nov 23, 2023
1 parent 7bcdfc9 commit ebb56e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions x/upgrade/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func BeginBlocker(k *keeper.Keeper, ctx sdk.Context, _ abci.RequestBeginBlock) {
plan, found := k.GetUpgradePlan(ctx)

if !k.DowngradeVerified() {
ctx := ctx.WithBlockGasMeter(sdk.NewInfiniteGasMeter()).WithGasMeter(sdk.NewInfiniteGasMeter())
k.SetDowngradeVerified(true)
// This check will make sure that we are using a valid binary.
// It'll panic in these cases if there is no upgrade handler registered for the last applied upgrade.
Expand Down

0 comments on commit ebb56e6

Please sign in to comment.