mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
@@ -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()[..])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user