Add TreeHash trait to all types and structs

This commit is contained in:
Kirk Baird
2019-01-25 12:22:56 +11:00
parent 407bf5e06d
commit 9c9b07c182
31 changed files with 642 additions and 31 deletions

View File

@@ -149,6 +149,12 @@ impl ssz::Decodable for BooleanBitfield {
}
}
impl ssz::TreeHash for BooleanBitfield {
fn hash_tree_root(&self) -> Vec<u8> {
self.to_bytes().hash_tree_root()
}
}
#[cfg(test)]
mod tests {
use super::*;