Move the cryptographic hash to newly created pallas-crypto

This commit is contained in:
Nicolas Di Prima 2022-01-17 23:16:13 +00:00
parent 9c4d41e711
commit 57d6791096
15 changed files with 309 additions and 71 deletions

View file

@ -37,8 +37,8 @@ impl DecodePayload for Content {
impl BlockLike for Content {
fn block_point(&self) -> Result<Point, Box<dyn std::error::Error>> {
let hash = crypto::hash_block_header(&self.1)?;
Ok(Point(self.1.header_body.slot, Vec::from(hash)))
let hash = crypto::hash_block_header(&self.1);
Ok(Point(self.1.header_body.slot, hash.to_vec()))
}
}