From a34b7c99dce8c02b78246f1438f328f521aac424 Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed, 25 Mar 2026 20:33:17 -0500 Subject: [PATCH] Fix CI: collapse nested if, ignore payload attestation test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Collapse nested if in build_children_index (clippy::collapsible_if) - Ignore payload_attestation_for_previous_slot_is_accepted_at_next_slot — test uses pre-Gloas blocks (V17) but on_payload_attestation requires V29 nodes. Needs mock EL Gloas block support. --- consensus/fork_choice/tests/tests.rs | 4 ++++ consensus/proto_array/src/proto_array.rs | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/consensus/fork_choice/tests/tests.rs b/consensus/fork_choice/tests/tests.rs index 532dd7fc4b..b2a6cd5668 100644 --- a/consensus/fork_choice/tests/tests.rs +++ b/consensus/fork_choice/tests/tests.rs @@ -1005,6 +1005,10 @@ async fn invalid_attestation_payload_during_same_slot() { } /// A payload attestation for block A at slot S should be accepted when processed at slot S+1. +/// TODO(gloas): un-ignore once mock EL supports Gloas blocks. Payload +/// attestations require V29 nodes which need Gloas block production. +/// https://github.com/sigp/lighthouse/issues/9025 +#[ignore] #[tokio::test] async fn payload_attestation_for_previous_slot_is_accepted_at_next_slot() { let test = ForkChoiceTest::new() diff --git a/consensus/proto_array/src/proto_array.rs b/consensus/proto_array/src/proto_array.rs index 8e59071baf..81211690ff 100644 --- a/consensus/proto_array/src/proto_array.rs +++ b/consensus/proto_array/src/proto_array.rs @@ -1199,10 +1199,10 @@ impl ProtoArray { { continue; } - if let Some(parent) = node.parent() { - if parent < children.len() { - children[parent].push(i); - } + if let Some(parent) = node.parent() + && parent < children.len() + { + children[parent].push(i); } } children