parent
ad62e1e35c
commit
73d86bcc3b
@ -20,9 +20,7 @@ pub struct BeaconBlock {
|
||||
|
||||
impl BeaconBlock {
|
||||
pub fn canonical_root(&self) -> Hash256 {
|
||||
// TODO: implement tree hashing.
|
||||
// https://github.com/sigp/lighthouse/issues/70
|
||||
Hash256::from(&canonical_hash(&ssz_encode(self))[..])
|
||||
Hash256::from(&self.hash_tree_root()[..])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,9 +64,7 @@ pub struct BeaconState {
|
||||
|
||||
impl BeaconState {
|
||||
pub fn canonical_root(&self) -> Hash256 {
|
||||
// TODO: implement tree hashing.
|
||||
// https://github.com/sigp/lighthouse/issues/70
|
||||
Hash256::from(&canonical_hash(&ssz_encode(self))[..])
|
||||
Hash256::from(&self.hash_tree_root()[..])
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user