From ef1a68867ba89e7b734294621b04edf416a213d5 Mon Sep 17 00:00:00 2001 From: jangko Date: Sun, 3 Apr 2022 12:03:42 +0700 Subject: [PATCH] txpool: fix wrong baseFee usage in runTx and runTxCommit --- nimbus/utils/tx_pool/tx_tasks/tx_packer.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimbus/utils/tx_pool/tx_tasks/tx_packer.nim b/nimbus/utils/tx_pool/tx_tasks/tx_packer.nim index 9075712e0..2d6485a0c 100644 --- a/nimbus/utils/tx_pool/tx_tasks/tx_packer.nim +++ b/nimbus/utils/tx_pool/tx_tasks/tx_packer.nim @@ -83,7 +83,7 @@ proc runTx(pst: TxPackerStateRef; item: TxItemRef): GasInt ## `gasUsed` after executing the transaction. let fork = pst.xp.chain.nextFork - baseFee = pst.xp.chain.head.baseFee.truncate(uint64).GasPrice + baseFee = pst.xp.chain.baseFee tx = item.tx.eip1559TxNormalization(baseFee, fork) safeExecutor "tx_packer.runTx": @@ -102,7 +102,7 @@ proc runTxCommit(pst: TxPackerStateRef; item: TxItemRef; gasBurned: GasInt) xp = pst.xp vmState = xp.chain.vmState inx = xp.txDB.byStatus.eq(txItemPacked).nItems - gasTip = item.tx.effectiveGasTip(xp.chain.head.baseFee) + gasTip = item.tx.effectiveGasTip(xp.chain.baseFee) # The gas tip cannot get negative as all items in the `staged` bucket # are vetted for profitability before entering that bucket.