mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 06:18:31 +00:00
Update types to new tree_hash crate
This commit is contained in:
@@ -4,7 +4,8 @@ use hex::encode as hex_encode;
|
||||
use serde::de::{Deserialize, Deserializer};
|
||||
use serde::ser::{Serialize, Serializer};
|
||||
use serde_hex::HexVisitor;
|
||||
use ssz::{decode, ssz_encode, Decodable, DecodeError, Encodable, SszStream, TreeHash};
|
||||
use ssz::{decode, ssz_encode, Decodable, DecodeError, Encodable, SszStream};
|
||||
use tree_hash::impl_tree_hash_for_ssz_bytes;
|
||||
|
||||
/// A single BLS signature.
|
||||
///
|
||||
@@ -69,11 +70,7 @@ impl<'de> Deserialize<'de> for SecretKey {
|
||||
}
|
||||
}
|
||||
|
||||
impl TreeHash for SecretKey {
|
||||
fn hash_tree_root(&self) -> Vec<u8> {
|
||||
self.0.as_bytes().clone()
|
||||
}
|
||||
}
|
||||
impl_tree_hash_for_ssz_bytes!(SecretKey);
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
Reference in New Issue
Block a user