mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 14:58:31 +00:00
Merge branch 'master' into lmd-ghost
This commit is contained in:
@@ -6,4 +6,3 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
tiny-keccak = "1.4.2"
|
||||
ssz = { path = "../ssz" }
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use ssz::{ssz_encode, Encodable as SszEncodable};
|
||||
use tiny_keccak::Keccak;
|
||||
|
||||
pub fn canonical_hash(input: &[u8]) -> Vec<u8> {
|
||||
@@ -9,10 +8,6 @@ pub fn canonical_hash(input: &[u8]) -> Vec<u8> {
|
||||
result
|
||||
}
|
||||
|
||||
pub fn hash_tree_root<T: SszEncodable>(input: &T) -> Vec<u8> {
|
||||
canonical_hash(&ssz_encode(input))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user