Backports for beta (#1888)

* Sync to peers with confirmed fork block only (#1863)

* Fixing gas conversion

* Validating u256->usize conversion

* Update cache usage on commiting block info (#1871)

* Use UntrustedRlp for block verification (#1872)

* take snapshot at specified block and slightly better informants (#1873)

* prettier informant for snapshot creation

* allow taking snapshot at a given block

* minor tweaks

* elaborate on cli

* Send new block hashes to all peers (#1875)

* Reduce max open files (#1876)

* ws-rs update

* Fixing test

* Fixing miner deadlock (#1885)
This commit is contained in:
Arkadiy Paronyan
2016-08-09 14:05:02 +02:00
committed by GitHub
parent 6336bdecf3
commit 52ac5a00f5
22 changed files with 360 additions and 145 deletions

View File

@@ -70,10 +70,10 @@ impl Visitor for UintVisitor {
0 => U256::from(0),
2 if value.starts_with("0x") => U256::from(0),
_ if value.starts_with("0x") => try!(U256::from_str(&value[2..]).map_err(|_| {
Error::custom(format!("Invalid hex value {}.", value).as_ref())
Error::custom(format!("Invalid hex value {}.", value).as_str())
})),
_ => try!(U256::from_dec_str(value).map_err(|_| {
Error::custom(format!("Invalid decimal value {}.", value).as_ref())
Error::custom(format!("Invalid decimal value {}.", value).as_str())
}))
};