File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -345,17 +345,13 @@ func (e *EVM) EstimateGas(
345345 passingGasLimit = uint64 (* txArgs .Gas )
346346 }
347347
348- // Cap the maximum gas allowance according to EIP-7825 if the estimation targets Osaka
349348 if passingGasLimit > gethParams .MaxTxGas {
350- latestBlockHeight , err := e .blocks .LatestEVMHeight ()
349+ // Cap the maximum gas allowance according to EIP-7825 if the estimation targets Osaka
350+ targetBlock , err := e .blocks .GetByHeight (height )
351351 if err != nil {
352352 return 0 , err
353353 }
354- latestBlock , err := e .blocks .GetByHeight (latestBlockHeight )
355- if err != nil {
356- return 0 , err
357- }
358- blockNumber , blockTime := new (big.Int ).SetUint64 (latestBlock .Height ), latestBlock .Timestamp
354+ blockNumber , blockTime := new (big.Int ).SetUint64 (targetBlock .Height ), targetBlock .Timestamp
359355 emulatorConfig := emulator .NewConfig (
360356 emulator .WithChainID (e .config .EVMNetworkID ),
361357 emulator .WithBlockNumber (blockNumber ),
You can’t perform that action at this time.
0 commit comments