From 861134d9231ccc9e450cb2ceb4c084335131f796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 11 Oct 2023 16:49:00 +0200 Subject: [PATCH] mpool: Fix CapGasFee maxFee handling Co-authored-by: Aayush Rajasekaran --- chain/messagepool/messagepool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index f0037de0912..d1496ceb920 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -226,7 +226,7 @@ func CapGasFee(mff dtypes.DefaultMaxFeeFunc, msg *types.Message, sendSpec *api.M gaslimit := types.NewInt(uint64(msg.GasLimit)) totalFee := types.BigMul(msg.GasFeeCap, gaslimit) - if !maximizeFeeCap && totalFee.GreaterThan(maxFee) { + if maximizeFeeCap || totalFee.GreaterThan(maxFee) { msg.GasFeeCap = big.Div(maxFee, gaslimit) }