mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 22:08:30 +00:00
Update types to new tree_hash crate
This commit is contained in:
@@ -3,10 +3,11 @@ use bls_aggregates::PublicKey as RawPublicKey;
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use serde_hex::{encode as hex_encode, HexVisitor};
|
||||
use ssz::{decode, hash, ssz_encode, Decodable, DecodeError, Encodable, SszStream, TreeHash};
|
||||
use ssz::{decode, ssz_encode, Decodable, DecodeError, Encodable, SszStream};
|
||||
use std::default;
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use tree_hash::impl_tree_hash_for_ssz_bytes;
|
||||
|
||||
/// A single BLS signature.
|
||||
///
|
||||
@@ -104,11 +105,7 @@ impl<'de> Deserialize<'de> for PublicKey {
|
||||
}
|
||||
}
|
||||
|
||||
impl TreeHash for PublicKey {
|
||||
fn hash_tree_root(&self) -> Vec<u8> {
|
||||
hash(&self.0.as_bytes())
|
||||
}
|
||||
}
|
||||
impl_tree_hash_for_ssz_bytes!(PublicKey);
|
||||
|
||||
impl PartialEq for PublicKey {
|
||||
fn eq(&self, other: &PublicKey) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user