mpool: Fix CapGasFee maxFee handling

Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
This commit is contained in:
Łukasz Magiera
2023-10-11 16:49:00 +02:00
committed by GitHub
co-authored by Aayush Rajasekaran
parent 00aad34194
commit 861134d923
+1 -1
View File
@@ -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)
}