applied changed from rlp_array

This commit is contained in:
debris 2015-12-14 12:18:53 +01:00
parent bd43d46026
commit fe9c8f8c11
3 changed files with 8 additions and 11 deletions

View File

@ -15,7 +15,6 @@ flate2 = "0.2"
rocksdb = "0.2.1"
evmjit = { path = "rust-evmjit", optional = true }
rustc-serialize = "0.3"
[features]
jit = ["evmjit"]

View File

@ -62,15 +62,14 @@ pub struct BlockDetails {
impl Decodable for BlockDetails {
fn decode<D>(decoder: &D) -> Result<Self, DecoderError> where D: Decoder {
decoder.read_list(| d | {
let details = BlockDetails {
number: try!(Decodable::decode(&d[0])),
total_difficulty: try!(Decodable::decode(&d[1])),
parent: try!(Decodable::decode(&d[2])),
children: try!(Decodable::decode(&d[3]))
};
Ok(details)
})
let d = try!(decoder.as_list());
let details = BlockDetails {
number: try!(Decodable::decode(&d[0])),
total_difficulty: try!(Decodable::decode(&d[1])),
parent: try!(Decodable::decode(&d[2])),
children: try!(Decodable::decode(&d[3]))
};
Ok(details)
}
}

View File

@ -76,7 +76,6 @@ extern crate flate2;
extern crate rocksdb;
extern crate env_logger;
extern crate rustc_serialize;
#[cfg(feature = "jit" )]
extern crate evmjit;
extern crate ethcore_util as util;