mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-25 13:09:23 +00:00
663c852b13
* Fast sync (work in progress) * Cargo.lock * Add missing hashes file * clippy warnings * Stub of database tool to create the fast sync hashes * Command line arg for target height, error handling * Cargo.lock * fmt and unused imports * fmt * Add license information to consensus/fast-sync/Cargo.toml Co-authored-by: Boog900 <boog900@tutanota.com> * Order imports in consensus/fast-sync/src/create.rs Co-authored-by: Boog900 <boog900@tutanota.com> * beautify hex generation function & fmt * Reorder imports consensus/fast-sync/src/fast_sync.rs
8 lines
215 B
Rust
8 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()
|
|
}
|