mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 19:00:46 +00:00
parent
42d3549e2c
commit
6f6e08f83b
1 changed files with 6 additions and 1 deletions
|
|
@ -187,7 +187,12 @@ func makeCallVariantGasCallEIP2929(oldCalculator gasFunc) gasFunc {
|
||||||
// outside of this function, as part of the dynamic gas, and that will make it
|
// outside of this function, as part of the dynamic gas, and that will make it
|
||||||
// also become correctly reported to tracers.
|
// also become correctly reported to tracers.
|
||||||
contract.Gas += coldCost
|
contract.Gas += coldCost
|
||||||
return gas + coldCost, nil
|
|
||||||
|
var overflow bool
|
||||||
|
if gas, overflow = math.SafeAdd(gas, coldCost); overflow {
|
||||||
|
return 0, ErrGasUintOverflow
|
||||||
|
}
|
||||||
|
return gas, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue