mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-25 21:19:24 +00:00
9 lines
215 B
Rust
9 lines
215 B
Rust
|
use sha3::{Digest, Keccak256};
|
||
|
|
||
|
pub type BlockId = [u8; 32];
|
||
|
pub type HashOfHashes = [u8; 32];
|
||
|
|
||
|
pub fn hash_of_hashes(hashes: &[BlockId]) -> HashOfHashes {
|
||
|
Keccak256::digest(hashes.concat().as_slice()).into()
|
||
|
}
|