cargo fmt

This commit is contained in:
realbigsean
2023-08-24 14:35:06 -04:00
parent f90b190d9a
commit 42b34dbbe4
10 changed files with 55 additions and 49 deletions

View File

@@ -129,7 +129,10 @@ impl<T: EthSpec> BlobSidecar<T> {
// Ensure that the blob is canonical by ensuring that
// each field element contained in the blob is < BLS_MODULUS
for i in 0..T::Kzg::FIELD_ELEMENTS_PER_BLOB {
let Some(byte) = blob_bytes.get_mut(i.checked_mul(T::Kzg::BYTES_PER_FIELD_ELEMENT).ok_or("overflow".to_string())?) else {
let Some(byte) = blob_bytes.get_mut(
i.checked_mul(T::Kzg::BYTES_PER_FIELD_ELEMENT)
.ok_or("overflow".to_string())?,
) else {
return Err(format!("blob byte index out of bounds: {:?}", i));
};
*byte = 0;