applied changed from rlp_array
This commit is contained in:
parent
bd43d46026
commit
fe9c8f8c11
@ -15,7 +15,6 @@ flate2 = "0.2"
|
||||
rocksdb = "0.2.1"
|
||||
|
||||
evmjit = { path = "rust-evmjit", optional = true }
|
||||
rustc-serialize = "0.3"
|
||||
|
||||
[features]
|
||||
jit = ["evmjit"]
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user