Skip to content

Commit

Permalink
core/vm: remove a redundant zero check in opAddmod (#29672)
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronChen0 committed Apr 30, 2024
1 parent 242b24a commit ea89f9a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/vm/instructions.go
Expand Up @@ -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
}

Expand Down

0 comments on commit ea89f9a

Please sign in to comment.