From 87a326d8a26e82b7ed4fb29cfa50a6fbf8f3a6ff Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 5 Feb 2019 12:41:56 +1100 Subject: [PATCH] Complete canonical_root for attestation_data --- eth2/types/src/attestation_data.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/eth2/types/src/attestation_data.rs b/eth2/types/src/attestation_data.rs index d509f6b3d..e2140527b 100644 --- a/eth2/types/src/attestation_data.rs +++ b/eth2/types/src/attestation_data.rs @@ -43,10 +43,8 @@ impl AttestationData { } } - // TODO: Implement this as a merkle root, once tree_ssz is implemented. - // https://github.com/sigp/lighthouse/issues/92 pub fn canonical_root(&self) -> Hash256 { - Hash256::zero() + Hash256::from(&self.hash_tree_root()[..]) } pub fn signable_message(&self, custody_bit: bool) -> Vec {