mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-04-23 03:00:50 -04:00
fix: use empty access list if eth_createAccessList returns error (#1799)
Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
var tag = "v4.7.12"
|
||||
var tag = "v4.7.13"
|
||||
|
||||
var commit = func() string {
|
||||
if info, ok := debug.ReadBuildInfo(); ok {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package sender
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
|
||||
@@ -134,11 +133,15 @@ func (s *Sender) estimateGasLimit(to *common.Address, data []byte, sidecar *type
|
||||
accessList, gasLimitWithAccessList, errStr, rpcErr := s.gethClient.CreateAccessList(s.ctx, msg)
|
||||
if rpcErr != nil {
|
||||
log.Error("CreateAccessList RPC error", "error", rpcErr)
|
||||
return gasLimitWithoutAccessList, nil, rpcErr
|
||||
// We ignore errors from eth_createAccessList and proceed
|
||||
// with sending the transaction without an access list.
|
||||
return gasLimitWithoutAccessList, nil, nil
|
||||
}
|
||||
if errStr != "" {
|
||||
// We ignore errors from eth_createAccessList and proceed
|
||||
// with sending the transaction without an access list.
|
||||
log.Error("CreateAccessList reported error", "error", errStr)
|
||||
return gasLimitWithoutAccessList, nil, errors.New(errStr)
|
||||
return gasLimitWithoutAccessList, nil, nil
|
||||
}
|
||||
|
||||
// Fine-tune accessList because 'to' address is automatically included in the access list by the Ethereum protocol: https://github.com/ethereum/go-ethereum/blob/v1.13.10/core/state/statedb.go#L1322
|
||||
|
||||
Reference in New Issue
Block a user