Skip to content

Commit

Permalink
fix: remove remove n
Browse files Browse the repository at this point in the history
  • Loading branch information
hhamud committed Sep 23, 2024
1 parent df166c8 commit 96e6e06
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/common/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ impl Digest {
}
}

// serializer and deserializer for rocksdb
// converts from bytearrays into digests
// padds it with zero if it is too small
impl <const N: usize> From<[u8; N]> for Digest {
fn from(value: [u8; N]) -> Self {
let mut digest = [0u8; 32];
digest[..N].copy_from_slice(&value);
Self(digest)
}
}


// implementing it for now to get things to compile, curve choice will be made later
Expand Down

0 comments on commit 96e6e06

Please sign in to comment.