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
parent 00aad34194
commit 861134d923
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
}