mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-12 00:51:29 +01:00
refactor: update repo to be compatible with Winterfell 0.8 (#275)
This commit is contained in:
committed by
Bobbin Threadbare
parent
552d90429b
commit
cd4525c7ad
@@ -206,14 +206,14 @@ impl Serializable for MerklePath {
|
||||
fn write_into<W: winter_utils::ByteWriter>(&self, target: &mut W) {
|
||||
assert!(self.nodes.len() <= u8::MAX.into(), "Length enforced in the constructor");
|
||||
target.write_u8(self.nodes.len() as u8);
|
||||
self.nodes.write_into(target);
|
||||
target.write_many(&self.nodes);
|
||||
}
|
||||
}
|
||||
|
||||
impl Deserializable for MerklePath {
|
||||
fn read_from<R: ByteReader>(source: &mut R) -> Result<Self, DeserializationError> {
|
||||
let count = source.read_u8()?.into();
|
||||
let nodes = RpoDigest::read_batch_from(source, count)?;
|
||||
let nodes = source.read_many::<RpoDigest>(count)?;
|
||||
Ok(Self { nodes })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user