FVM: Use MaxInt64 for Implicit Message gas limits

This commit is contained in:
Aayush 2022-07-14 17:40:13 -04:00
parent d4cdd82f72
commit 7cd0ce4010

View File

@ -5,6 +5,7 @@ import (
"context" "context"
"fmt" "fmt"
"io" "io"
"math"
"os" "os"
"sort" "sort"
"sync" "sync"
@ -481,6 +482,7 @@ func (vm *FVM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet
func (vm *FVM) ApplyImplicitMessage(ctx context.Context, cmsg *types.Message) (*ApplyRet, error) { func (vm *FVM) ApplyImplicitMessage(ctx context.Context, cmsg *types.Message) (*ApplyRet, error) {
start := build.Clock.Now() start := build.Clock.Now()
cmsg.GasLimit = math.MaxInt64 / 2
vmMsg := cmsg.VMMessage() vmMsg := cmsg.VMMessage()
msgBytes, err := vmMsg.Serialize() msgBytes, err := vmMsg.Serialize()
if err != nil { if err != nil {