Do first pass on Grants code

This commit is contained in:
Paul Hauner
2019-08-07 13:20:15 +10:00
parent ce73705498
commit 2c3fc318ba
4 changed files with 141 additions and 17 deletions

View File

@@ -62,6 +62,11 @@ impl<T: EthSpec> BeaconBlock<T> {
}
}
/// Returns the epoch corresponding to `self.slot`.
pub fn epoch(&self) -> Epoch {
self.slot.epoch(T::slots_per_epoch())
}
/// Returns the `signed_root` of the block.
///
/// Spec v0.8.1