From 1f8c9308faa91ff64a6bca162732c01164aa5d28 Mon Sep 17 00:00:00 2001 From: colinlyguo Date: Thu, 14 Mar 2024 17:39:00 +0800 Subject: [PATCH] address comment --- rollup/internal/controller/sender/estimategas.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rollup/internal/controller/sender/estimategas.go b/rollup/internal/controller/sender/estimategas.go index 4d88dd4d4..ce9ddf222 100644 --- a/rollup/internal/controller/sender/estimategas.go +++ b/rollup/internal/controller/sender/estimategas.go @@ -41,11 +41,7 @@ func (s *Sender) estimateDynamicGas(to *common.Address, data []byte, baseFee uin return nil, err } - // gasFeeCap = baseFee * 2 + gasTipCap - gasFeeCap := new(big.Int).SetUint64(baseFee) - gasFeeCap = new(big.Int).Mul(gasFeeCap, big.NewInt(2)) - gasFeeCap = new(big.Int).Add(gasFeeCap, gasTipCap) - + gasFeeCap := getGasFeeCap(new(big.Int).SetUint64(baseFee), gasTipCap) gasLimit, accessList, err := s.estimateGasLimit(to, data, nil, nil, gasTipCap, gasFeeCap, nil) if err != nil { log.Error("estimateDynamicGas estimateGasLimit failure",