Check if a node is a zombie (deleted but with live connections). A zombie node has at least one deleted block parent edge, meaning something explicitly deleted it. Uses typed [`ParentEdgeKind`] matching for clarity.
(
txn: &T,
node: &GraphNode<NodeId>,
)
| 119 | /// something explicitly deleted it. Uses typed [`ParentEdgeKind`] |
| 120 | /// matching for clarity. |
| 121 | pub(super) fn is_vertex_zombie<T: GraphTxnT>( |
| 122 | txn: &T, |
| 123 | node: &GraphNode<NodeId>, |
| 124 | ) -> Result<bool, PristineError> { |
| 125 | // Include deleted edges so we can see deletion markers |
| 126 | let parents = txn.iter_parents(*node, true)?; |
| 127 | |
| 128 | for parent in &parents { |
| 129 | if parent.kind == ParentEdgeKind::BlockDeleted { |
| 130 | return Ok(true); // Has a deleted block parent = zombie |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | Ok(false) |
| 135 | } |
no test coverage detected