Add canonical_hash method to BeaconState

This commit is contained in:
Paul Hauner 2018-12-13 17:32:48 +11:00
parent 220a5bad76
commit 96c2012434
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C

View File

@ -43,3 +43,11 @@ pub struct BeaconState {
pub processed_pow_receipt_root: Hash256, pub processed_pow_receipt_root: Hash256,
pub candidate_pow_receipt_roots: Vec<CandidatePoWReceiptRootRecord>, pub candidate_pow_receipt_roots: Vec<CandidatePoWReceiptRootRecord>,
} }
impl BeaconState {
pub fn canonical_root(&self) -> Hash256 {
// TODO: implement tree hashing.
// https://github.com/sigp/lighthouse/issues/70
Hash256::zero()
}
}