using rlp::encode
This commit is contained in:
parent
0905372f70
commit
6b02b6eddb
@ -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())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user