core/vm: remove a redundant zero check in opAddmod

This commit is contained in:
Aaron Chen 2024-04-28 22:20:14 +08:00 committed by GitHub
parent 4bdbaab471
commit c477ea67b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -173,11 +173,7 @@ func opByte(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byt
func opAddmod(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]byte, error) {
x, y, z := scope.Stack.pop(), scope.Stack.pop(), scope.Stack.peek()
if z.IsZero() {
z.Clear()
} else {
z.AddMod(&x, &y, z)
}
z.AddMod(&x, &y, z)
return nil, nil
}