Skip to content

Commit b82e9c8

Browse files
committed
remove commented code
Signed-off-by: Chen Kai <281165273grape@gmail.com>
1 parent dcf06d7 commit b82e9c8

1 file changed

Lines changed: 0 additions & 42 deletions

File tree

src/forkchoice/proto_array_lighthouse.zig

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -571,48 +571,6 @@ pub const ProtoArray = struct {
571571
return false;
572572
}
573573

574-
// fn invalidateAncestors(
575-
// self: *ProtoArray,
576-
// start_index: usize,
577-
// invalidated_indices: *std.AutoHashMap(usize, void),
578-
// head_block_root: *const primitives.Root,
579-
// latest_valid_ancestor_is_descendant: bool,
580-
// op: *const InvalidationOperation,
581-
// ) !void {
582-
// var index = start_index;
583-
//
584-
// while (true) {
585-
// var node = &self.nodes.items[index];
586-
// std.debug.print("Invalidating block at index {}: status={}\n", .{ index, node.execution_status });
587-
//
588-
// // Only invalidate if:
589-
// // 1. This is the head block, or
590-
// // 2. We have a valid ancestor and are still traversing between head and ancestor, or
591-
// // 3. We should always invalidate blocks (based on op)
592-
// if (std.mem.eql(u8, &node.root, head_block_root) or
593-
// latest_valid_ancestor_is_descendant or
594-
// shouldInvalidateBlock(op))
595-
// {
596-
// switch (node.execution_status) {
597-
// .Valid => |_| return error.ValidExecutionStatusBecameInvalid,
598-
// .Optimistic => |hash| {
599-
// try invalidated_indices.put(index, {});
600-
// node.execution_status = .{ .Invalid = hash };
601-
// node.best_child = null;
602-
// node.best_descendant = null;
603-
// },
604-
// .Invalid => {},
605-
// .Irrelevant => break,
606-
// }
607-
// } else {
608-
// break;
609-
// }
610-
//
611-
// if (node.parent) |parent_index| {
612-
// index = parent_index;
613-
// } else break;
614-
// }
615-
// }
616574
fn invalidateAncestors(
617575
self: *ProtoArray,
618576
start_index: usize,

0 commit comments

Comments
 (0)