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 Dec 19, 2023
1 parent d8fb76d commit 4b6143e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x/upgrade/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ func PreBlocker(ctx context.Context, k *keeper.Keeper) (appmodule.ResponsePreBlo
found := err == nil

if !k.DowngradeVerified() {
ctx := sdkCtx.WithBlockGasMeter(storetypes.NewInfiniteGasMeter()).WithGasMeter(storetypes.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 4b6143e

Please sign in to comment.