Correct contract address for EIP-86

This commit is contained in:
arkpar 2017-04-19 14:48:02 +02:00
parent b50fb71dd1
commit 04e581db61

View File

@ -46,7 +46,7 @@ pub fn contract_address(address_scheme: CreateContractAddress, sender: &Address,
From::from(stream.as_raw().sha3())
},
CreateContractAddress::FromCodeHash => {
let mut buffer = [0u8; 20 + 32];
let mut buffer = [0xffu8; 20 + 32];
&mut buffer[20..].copy_from_slice(&code_hash[..]);
From::from((&buffer[..]).sha3())
},