From 6df55970aab1b138ebe10cf7f87c4a6148f25462 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Thu, 2 Apr 2026 14:24:37 +1100 Subject: [PATCH] Simplify find_head_walk --- consensus/proto_array/src/proto_array.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/consensus/proto_array/src/proto_array.rs b/consensus/proto_array/src/proto_array.rs index 3bf8994c67..39c638f4a8 100644 --- a/consensus/proto_array/src/proto_array.rs +++ b/consensus/proto_array/src/proto_array.rs @@ -1232,11 +1232,7 @@ impl ProtoArray { head = children .into_iter() - .map(|(child, _)| -> Result<_, Error> { - let proto_node = self - .nodes - .get(child.proto_node_index) - .ok_or(Error::InvalidNodeIndex(child.proto_node_index))?; + .map(|(child, ref proto_node)| -> Result<_, Error> { let weight = self.get_weight::( &child, proto_node,