mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
Update contracts.go
This commit is contained in:
parent
0ceb286d14
commit
9caab0d8de
1 changed files with 3 additions and 6 deletions
|
|
@ -469,18 +469,15 @@ func (c *bigModExp) RequiredGas(input []byte) uint64 {
|
||||||
if gas.BitLen() > 64 {
|
if gas.BitLen() > 64 {
|
||||||
return math.MaxUint64
|
return math.MaxUint64
|
||||||
}
|
}
|
||||||
|
return max(minPrice, gas.Uint64())
|
||||||
|
}
|
||||||
|
|
||||||
if gas.Uint64() < minPrice {
|
// Pre-osaka logic.
|
||||||
return minPrice
|
|
||||||
}
|
|
||||||
return gas.Uint64()
|
|
||||||
}
|
|
||||||
gas = modexpMultComplexity(gas)
|
gas = modexpMultComplexity(gas)
|
||||||
if adjExpLen.Cmp(big1) > 0 {
|
if adjExpLen.Cmp(big1) > 0 {
|
||||||
gas.Mul(gas, adjExpLen)
|
gas.Mul(gas, adjExpLen)
|
||||||
}
|
}
|
||||||
gas.Div(gas, big20)
|
gas.Div(gas, big20)
|
||||||
|
|
||||||
if gas.BitLen() > 64 {
|
if gas.BitLen() > 64 {
|
||||||
return math.MaxUint64
|
return math.MaxUint64
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue