Tidy ancestor iterators (#490)

* Tidy ancestor iterators

* Improve comments, remove code fragement
This commit is contained in:
Paul Hauner
2019-08-08 12:28:10 +10:00
committed by GitHub
parent 66c7337e21
commit 3a1f56a42e
11 changed files with 123 additions and 201 deletions

View File

@@ -198,7 +198,7 @@ where
fn get_state_at_slot(&self, state_slot: Slot) -> BeaconState<E> {
let state_root = self
.chain
.rev_iter_state_roots(self.chain.current_state().slot - 1)
.rev_iter_state_roots(self.chain.head().beacon_state.slot - 1)
.find(|(_hash, slot)| *slot == state_slot)
.map(|(hash, _slot)| hash)
.expect("could not find state root");