Fix bug in rev block iter
This commit is contained in:
parent
ed9f655877
commit
f52d66a136
@ -53,7 +53,7 @@ impl<T: EthSpec, U: Store> Iterator for BlockRootsIterator<T, U> {
|
|||||||
type Item = Hash256;
|
type Item = Hash256;
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
if self.slot == 0 {
|
if (self.slot == 0) || (self.slot > self.beacon_state.slot) {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user