From 0427b162c447264fd31fbbc8411992615490a0b2 Mon Sep 17 00:00:00 2001 From: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com> Date: Sun, 1 Oct 2023 14:22:18 +0200 Subject: [PATCH] Optimize gas by default in eth_createAccessList (#8337) Enable gas optimizations of PRs #3453 & #8261 unless the `optimizeGas` argument is explicitly set to `false`. --- turbo/jsonrpc/eth_call.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/turbo/jsonrpc/eth_call.go b/turbo/jsonrpc/eth_call.go index 74c809bc1..b47e38bc0 100644 --- a/turbo/jsonrpc/eth_call.go +++ b/turbo/jsonrpc/eth_call.go @@ -558,7 +558,7 @@ func (api *APIImpl) CreateAccessList(ctx context.Context, args ethapi2.CallArgs, errString = res.Err.Error() } accessList := &accessListResult{Accesslist: &accessList, Error: errString, GasUsed: hexutil.Uint64(res.UsedGas)} - if optimizeGas != nil && *optimizeGas { + if optimizeGas == nil || *optimizeGas { // optimize gas unless explicitly told not to optimizeWarmAddrInAccessList(accessList, *args.From) optimizeWarmAddrInAccessList(accessList, to) optimizeWarmAddrInAccessList(accessList, header.Coinbase)