mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-01-25 03:55:52 +00:00
663c852b13
Some checks failed
Audit / audit (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Deny / audit (push) Has been cancelled
* 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()
|
|
}
|