Skip to content
Snippets Groups Projects
Unverified Commit 5761b784 authored by STEVAN Antoine's avatar STEVAN Antoine :crab:
Browse files

remove `one_less` from `merge_elements_into_bytes`

parent 5531b31a
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
......@@ -109,7 +109,7 @@ pub fn decode<E: Pairing>(blocks: Vec<Shard<E>>, transpose: bool) -> Result<Vec<
source_shards.elements
};
let mut bytes = field::merge_elements_into_bytes::<E>(&source_shards, true);
let mut bytes = field::merge_elements_into_bytes::<E>(&source_shards);
bytes.resize(blocks[0].size, 0);
Ok(bytes)
}
......
......@@ -29,16 +29,11 @@ pub(crate) fn split_data_into_field_elements<E: Pairing>(
elements
}
pub(crate) fn merge_elements_into_bytes<E: Pairing>(
elements: &[E::ScalarField],
one_less: bool,
) -> Vec<u8> {
pub(crate) fn merge_elements_into_bytes<E: Pairing>(elements: &[E::ScalarField]) -> Vec<u8> {
let mut bytes = vec![];
for e in elements {
let mut b = e.into_bigint().to_bytes_le();
if one_less {
b.pop();
}
b.pop();
bytes.append(&mut b);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment