[release/1.4.15] cmd, core, internal, light, tests: avoid hashing the code in the VM
(cherry picked from commit cb84e3f029)
			
			
This commit is contained in:
		| @@ -79,10 +79,11 @@ func (evm *EVM) Run(contract *Contract, input []byte) (ret []byte, err error) { | ||||
| 		return nil, nil | ||||
| 	} | ||||
|  | ||||
| 	var ( | ||||
| 		codehash = crypto.Keccak256Hash(contract.Code) // codehash is used when doing jump dest caching | ||||
| 		program  *Program | ||||
| 	) | ||||
| 	codehash := contract.CodeHash // codehash is used when doing jump dest caching | ||||
| 	if codehash == (common.Hash{}) { | ||||
| 		codehash = crypto.Keccak256Hash(contract.Code) | ||||
| 	} | ||||
| 	var program *Program | ||||
| 	if evm.cfg.EnableJit { | ||||
| 		// If the JIT is enabled check the status of the JIT program, | ||||
| 		// if it doesn't exist compile a new program in a separate | ||||
|   | ||||
		Reference in New Issue
	
	Block a user