core/vm: optimize opKeccak256 using uint256.Int.SetBytes32

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

View file

@ -240,7 +240,7 @@ func opKeccak256(pc *uint64, evm *EVM, scope *ScopeContext) ([]byte, error) {
if evm.Config.EnablePreimageRecording {
evm.StateDB.AddPreimage(evm.hasherBuf, data)
}
size.SetBytes(evm.hasherBuf[:])
size.SetBytes32(evm.hasherBuf[:])
return nil, nil
}