core/vm: remove a redundant zero check in opAddmod #29672 (#1954)

Co-authored-by: Aaron Chen <aaronchen.lisp@gmail.com>
This commit is contained in:
Daniel Liu 2026-01-19 14:46:20 +08:00 committed by GitHub
parent bef85ec37b
commit f0b523d635
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,11 +172,7 @@ func opByte(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
func opAddmod(pc *uint64, evm *EVM, 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
}