mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-23 17:28:27 +00:00
txpool: fix wrong baseFee usage in runTx and runTxCommit
This commit is contained in:
parent
00e2ec7d38
commit
ef1a68867b
@ -83,7 +83,7 @@ proc runTx(pst: TxPackerStateRef; item: TxItemRef): GasInt
|
|||||||
## `gasUsed` after executing the transaction.
|
## `gasUsed` after executing the transaction.
|
||||||
let
|
let
|
||||||
fork = pst.xp.chain.nextFork
|
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)
|
tx = item.tx.eip1559TxNormalization(baseFee, fork)
|
||||||
|
|
||||||
safeExecutor "tx_packer.runTx":
|
safeExecutor "tx_packer.runTx":
|
||||||
@ -102,7 +102,7 @@ proc runTxCommit(pst: TxPackerStateRef; item: TxItemRef; gasBurned: GasInt)
|
|||||||
xp = pst.xp
|
xp = pst.xp
|
||||||
vmState = xp.chain.vmState
|
vmState = xp.chain.vmState
|
||||||
inx = xp.txDB.byStatus.eq(txItemPacked).nItems
|
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
|
# The gas tip cannot get negative as all items in the `staged` bucket
|
||||||
# are vetted for profitability before entering that bucket.
|
# are vetted for profitability before entering that bucket.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user