Merge branch 'master' into ethminer_crate

Conflicts:
	parity/main.rs
This commit is contained in:
Tomasz Drwięga
2016-03-12 10:22:43 +01:00
7 changed files with 883 additions and 11 deletions

View File

@@ -13,17 +13,14 @@ pub struct AccountDB<'db> {
#[inline]
fn combine_key<'a>(address: &'a H256, key: &'a H256) -> H256 {
let mut addr_hash = address.sha3();
// preserve 96 bits of original key for db lookup
addr_hash[0..12].clone_from_slice(&[0u8; 12]);
&addr_hash ^ key
address ^ key
}
impl<'db> AccountDB<'db> {
pub fn new(db: &'db HashDB, address: &Address) -> AccountDB<'db> {
AccountDB {
db: db,
address: x!(address.clone()),
address: x!(address),
}
}
}
@@ -70,7 +67,7 @@ impl<'db> AccountDBMut<'db> {
pub fn new(db: &'db mut HashDB, address: &Address) -> AccountDBMut<'db> {
AccountDBMut {
db: db,
address: x!(address.clone()),
address: x!(address),
}
}

View File

@@ -109,7 +109,7 @@ pub struct Client<V = CanonVerifier> where V: Verifier {
}
const HISTORY: u64 = 1000;
const CLIENT_DB_VER_STR: &'static str = "5.1";
const CLIENT_DB_VER_STR: &'static str = "5.2";
impl Client<CanonVerifier> {
/// Create a new client with given spec and DB path.