mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-03 11:41:17 +00:00
core: fix floor base costs
This commit is contained in:
parent
5b92de2dc5
commit
22470f9617
1 changed files with 2 additions and 4 deletions
|
|
@ -242,12 +242,10 @@ func FloorDataGas(rules params.Rules, from common.Address, to *common.Address, v
|
|||
tokenCost = params.TxCostFloorPerToken
|
||||
}
|
||||
|
||||
// The floor is anchored to the transaction base cost. Under EIP-2780 that
|
||||
// base is the per-resource decomposition (the same one used by the intrinsic
|
||||
// gas), so the floor never undercuts the transaction's own base.
|
||||
// The floor is anchored to the transaction base cost.
|
||||
floorBase := params.TxGas
|
||||
if rules.IsAmsterdam {
|
||||
floorBase = intrinsicBaseGasEIP2780(from, to, value)
|
||||
floorBase = params.TxBaseCost2780
|
||||
}
|
||||
// Check for overflow
|
||||
if (math.MaxUint64-floorBase)/tokenCost < tokens {
|
||||
|
|
|
|||
Loading…
Reference in a new issue