diff --git a/sync/src/chain.rs b/sync/src/chain.rs index 89c75feff..d347cafa9 100644 --- a/sync/src/chain.rs +++ b/sync/src/chain.rs @@ -1067,11 +1067,7 @@ impl ChainSync { match route.blocks.len() { 0 => None, _ => { - let mut rlp_stream = RlpStream::new_list(route.blocks.len()); - for hash in route.blocks { - rlp_stream.append(&hash); - } - Some(rlp_stream.out()) + Some(rlp::encode(&route.blocks).to_vec()) } } },