mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
core/vm: fix comment and remove unused divisor in osakaModexpGas
This commit is contained in:
parent
b381804eb1
commit
4d6c937ae7
1 changed files with 1 additions and 2 deletions
|
|
@ -531,7 +531,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
|
||||
)
|
||||
|
||||
|
|
@ -542,7 +541,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