Hashable::sha3 -> fn keccak for ethcore
This commit is contained in:
@@ -23,14 +23,14 @@ use util::Bytes;
|
||||
use util::{Address, H256};
|
||||
use util::kvdb::Database;
|
||||
use util::migration::{Batch, Config, Error, Migration, SimpleMigration, Progress};
|
||||
use util::sha3::Hashable;
|
||||
use hash::keccak;
|
||||
use std::sync::Arc;
|
||||
|
||||
use rlp::{decode, Rlp, RlpStream};
|
||||
|
||||
// attempt to migrate a key, value pair. None if migration not possible.
|
||||
fn attempt_migrate(mut key_h: H256, val: &[u8]) -> Option<H256> {
|
||||
let val_hash = val.sha3();
|
||||
let val_hash = keccak(val);
|
||||
|
||||
if key_h != val_hash {
|
||||
// this is a key which has been xor'd with an address.
|
||||
@@ -43,7 +43,7 @@ fn attempt_migrate(mut key_h: H256, val: &[u8]) -> Option<H256> {
|
||||
return None;
|
||||
}
|
||||
|
||||
let address_hash = Address::from(address).sha3();
|
||||
let address_hash = keccak(Address::from(address));
|
||||
|
||||
// create the xor'd key in place.
|
||||
key_h.copy_from_slice(&*val_hash);
|
||||
|
||||
Reference in New Issue
Block a user