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:
dapplion
2026-03-25 18:22:28 -05:00
parent 66f71b3f22
commit 84679b1c07

View File

@@ -1217,14 +1217,7 @@ impl ProtoArray {
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.
let children: Vec<usize> = self