mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Merge pull request #290 from mjkeating/tree_hash_spec_update
Updated TreeHash logic as per revised spec
This commit is contained in:
@@ -87,7 +87,7 @@ impl Serialize for AggregateSignature {
|
||||
}
|
||||
|
||||
impl TreeHash for AggregateSignature {
|
||||
fn hash_tree_root_internal(&self) -> Vec<u8> {
|
||||
fn hash_tree_root(&self) -> Vec<u8> {
|
||||
hash(&self.0.as_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ impl<'de> Deserialize<'de> for PublicKey {
|
||||
}
|
||||
|
||||
impl TreeHash for PublicKey {
|
||||
fn hash_tree_root_internal(&self) -> Vec<u8> {
|
||||
fn hash_tree_root(&self) -> Vec<u8> {
|
||||
hash(&self.0.as_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ impl<'de> Deserialize<'de> for SecretKey {
|
||||
}
|
||||
|
||||
impl TreeHash for SecretKey {
|
||||
fn hash_tree_root_internal(&self) -> Vec<u8> {
|
||||
fn hash_tree_root(&self) -> Vec<u8> {
|
||||
self.0.as_bytes().clone()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ impl Decodable for Signature {
|
||||
}
|
||||
|
||||
impl TreeHash for Signature {
|
||||
fn hash_tree_root_internal(&self) -> Vec<u8> {
|
||||
fn hash_tree_root(&self) -> Vec<u8> {
|
||||
hash(&self.0.as_bytes())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user