diff --git a/rollup/internal/controller/relayer/l2_relayer.go b/rollup/internal/controller/relayer/l2_relayer.go index 0b8eae7cd..fa4305895 100644 --- a/rollup/internal/controller/relayer/l2_relayer.go +++ b/rollup/internal/controller/relayer/l2_relayer.go @@ -346,7 +346,7 @@ func (r *Layer2Relayer) ProcessGasPriceOracle() { // last is undefine or (suggestGasPriceUint64 >= minGasPrice && exceed diff) if r.lastGasPrice == 0 || (suggestGasPriceUint64 >= r.minGasPrice && - (math.Abs(float64(suggestGasPriceUint64)-float64(lastGasPrice)) >= float64(expectedDelta))) { + (math.Abs(float64(suggestGasPriceUint64)-float64(r.lastGasPrice)) >= float64(expectedDelta))) { data, err := r.l2GasOracleABI.Pack("setL2BaseFee", suggestGasPrice) if err != nil { log.Error("Failed to pack setL2BaseFee", "batch.Hash", batch.Hash, "GasPrice", suggestGasPrice.Uint64(), "err", err)