From f0b523d635ea5b6534a2f9f6340b98b25db07124 Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Mon, 19 Jan 2026 14:46:20 +0800 Subject: [PATCH] core/vm: remove a redundant zero check in opAddmod #29672 (#1954) Co-authored-by: Aaron Chen --- core/vm/instructions.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 00d20de1c0..9203f72228 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -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 }