core/vm: optimize opExtCodeHash using SetBytes32

This commit is contained in:
cuiweixie 2025-10-19 00:25:55 +08:00
parent 0ec63272bf
commit 2c2bc34eeb
No known key found for this signature in database
GPG key ID: 16DF64EE15E495A3

View file

@ -411,7 +411,7 @@ func opExtCodeHash(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
if evm.StateDB.Empty(address) { if evm.StateDB.Empty(address) {
slot.Clear() slot.Clear()
} else { } else {
slot.SetBytes(evm.StateDB.GetCodeHash(address).Bytes()) slot.SetBytes32(evm.StateDB.GetCodeHash(address).Bytes())
} }
return nil, nil return nil, nil
} }