internal/ethapi: rewrite fmt.Errorf to errors.New in eth_createAccessList handler

This commit is contained in:
sashabeton 2025-03-18 20:40:31 +01:00
parent 19c1f8ebcd
commit c5e3ac1736

View file

@ -1174,7 +1174,7 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH
// Prevent redundant operations if args contain more authorizations than EVM may handle
maxAuthorizations := uint64(*args.Gas) / params.CallNewAccountGas
if uint64(len(args.AuthorizationList)) > maxAuthorizations {
return nil, 0, nil, fmt.Errorf("insufficient gas to process all authorizations")
return nil, 0, nil, errors.New("insufficient gas to process all authorizations")
}
for _, auth := range args.AuthorizationList {