Move the cryptographic hash to newly created pallas-crypto
This commit is contained in:
parent
cea75d6626
commit
ad2e0d1bb3
15 changed files with 309 additions and 71 deletions
|
|
@ -29,8 +29,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.0.header)?;
|
||||
Ok(Point(self.0.header.header_body.slot, Vec::from(hash)))
|
||||
let hash = crypto::hash_block_header(&self.0.header);
|
||||
Ok(Point(self.0.header.header_body.slot, hash.to_vec()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue