Skip to content

Commit 8f31510

Browse files
committed
Fix tree_roots
1 parent 37706b6 commit 8f31510

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

beacon_node/beacon_chain/src/summaries_dag.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,14 @@ impl StateSummariesDAG {
238238
self.state_summaries_by_state_root
239239
.iter()
240240
.filter_map(|(state_root, summary)| {
241-
if summary.previous_state_root == Hash256::ZERO {
242-
Some((*state_root, *summary))
243-
} else {
241+
if self
242+
.state_summaries_by_state_root
243+
.contains_key(&summary.previous_state_root)
244+
{
245+
// Summaries with a known parent are not roots
244246
None
247+
} else {
248+
Some((*state_root, *summary))
245249
}
246250
})
247251
.collect()

0 commit comments

Comments
 (0)