mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
* add runtime variable list type * add configs to ChainSpec * git rid of max request blocks type * fix tests and lints * remove todos * git rid of old const usage * fix decode impl * add new config to `Config` api struct * add docs fix compilt * move methods for per-fork-spec to chainspec * get values off chain spec * fix compile * remove min by root size * add tests for runtime var list --------- Co-authored-by: Jimmy Chen <jchen.tc@gmail.com>
9 lines
360 B
Rust
9 lines
360 B
Rust
use ethereum_hashing::hash_fixed;
|
|
use types::{KzgCommitment, VersionedHash, VERSIONED_HASH_VERSION_KZG};
|
|
|
|
pub fn kzg_commitment_to_versioned_hash(kzg_commitment: &KzgCommitment) -> VersionedHash {
|
|
let mut hashed_commitment = hash_fixed(&kzg_commitment.0);
|
|
hashed_commitment[0] = VERSIONED_HASH_VERSION_KZG;
|
|
VersionedHash::from(hashed_commitment)
|
|
}
|