Tidy ancestor iterators

This commit is contained in:
Paul Hauner
2019-08-05 16:25:21 +10:00
parent 01054ecf2f
commit b096e3a643
11 changed files with 125 additions and 199 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");