using rlp::encode

This commit is contained in:
Nikolay Volf 2016-02-06 22:25:20 +03:00
parent 0905372f70
commit 6b02b6eddb

View File

@ -1067,11 +1067,7 @@ impl ChainSync {
match route.blocks.len() { match route.blocks.len() {
0 => None, 0 => None,
_ => { _ => {
let mut rlp_stream = RlpStream::new_list(route.blocks.len()); Some(rlp::encode(&route.blocks).to_vec())
for hash in route.blocks {
rlp_stream.append(&hash);
}
Some(rlp_stream.out())
} }
} }
}, },