mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
core/vm: fix comment and remove unused divisor in osakaModexpGas (#32553)
The `divisor` const is not needed in the gas cost calculation in `osakaModexpGas`.
This commit is contained in:
parent
dd7fe1be4b
commit
b708feb9c3
1 changed files with 1 additions and 2 deletions
|
|
@ -538,7 +538,6 @@ func berlinModexpGas(baseLen, expLen, modLen uint64, expHead uint256.Int) uint64
|
|||
func osakaModexpGas(baseLen, expLen, modLen uint64, expHead uint256.Int) uint64 {
|
||||
const (
|
||||
multiplier = 16
|
||||
divisor = 3
|
||||
minGas = 500
|
||||
)
|
||||
|
||||
|
|
@ -549,7 +548,7 @@ func osakaModexpGas(baseLen, expLen, modLen uint64, expHead uint256.Int) uint64
|
|||
}
|
||||
iterationCount := modexpIterationCount(expLen, expHead, multiplier)
|
||||
|
||||
// Calculate gas: (multComplexity * iterationCount) / osakaDivisor
|
||||
// Calculate gas: multComplexity * iterationCount
|
||||
carry, gas := bits.Mul64(iterationCount, multComplexity)
|
||||
if carry != 0 {
|
||||
return math.MaxUint64
|
||||
|
|
|
|||
Loading…
Reference in a new issue