mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 08:52:54 +00:00
Remove redundant invalid-node check from filter_block_tree
The children filter already skips invalid nodes, so a valid parent whose only children are invalid becomes a leaf and gets rejected by node_is_viable_for_head. The top-level check was redundant.
This commit is contained in:
@@ -1217,14 +1217,7 @@ impl ProtoArray {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Nodes with invalid execution payloads are never viable.
|
|
||||||
// (The spec doesn't need this check because invalid blocks aren't in store.blocks.)
|
|
||||||
if node
|
|
||||||
.execution_status()
|
|
||||||
.is_ok_and(|status| status.is_invalid())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Skip invalid children — they aren't in store.blocks in the spec.
|
// Skip invalid children — they aren't in store.blocks in the spec.
|
||||||
let children: Vec<usize> = self
|
let children: Vec<usize> = self
|
||||||
|
|||||||
Reference in New Issue
Block a user