mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-02-04 04:06:41 +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()
|
||
|
}
|