Add error handling to iterators (#1243)

* Add error handling to iterators

* Review feedback

* Leverage itertools::process_results() in few places
This commit is contained in:
Adam Szkoda
2020-06-10 01:55:44 +02:00
committed by GitHub
parent ed4b3ef471
commit 7f036a6e95
17 changed files with 193 additions and 119 deletions

View File

@@ -149,7 +149,7 @@ impl<E: EthSpec> Store<E> for MemoryStore<E> {
end_state: BeaconState<E>,
end_block_root: Hash256,
_: &ChainSpec,
) -> Self::ForwardsBlockRootsIterator {
) -> Result<Self::ForwardsBlockRootsIterator, Error> {
SimpleForwardsBlockRootsIterator::new(store, start_slot, end_state, end_block_root)
}