From 99450793a51a731d1d16805c3c2ef4527943e7e9 Mon Sep 17 00:00:00 2001 From: Eitan Seri-Levi Date: Mon, 6 Jan 2025 16:41:22 +0700 Subject: [PATCH] Removed unusued codepaths --- beacon_node/http_api/tests/fork_tests.rs | 4 --- .../src/network_beacon_processor/mod.rs | 3 +-- consensus/types/src/attestation.rs | 27 ------------------- 3 files changed, 1 insertion(+), 33 deletions(-) diff --git a/beacon_node/http_api/tests/fork_tests.rs b/beacon_node/http_api/tests/fork_tests.rs index 52b2e12619..d6b8df33b3 100644 --- a/beacon_node/http_api/tests/fork_tests.rs +++ b/beacon_node/http_api/tests/fork_tests.rs @@ -155,10 +155,6 @@ async fn attestations_across_fork_with_skip_slots() { .post_beacon_pool_attestations_v1(&unaggregated_attestations) .await .unwrap(); - // client - // .post_beacon_pool_attestations_v2(&unaggregated_attestations, fork_name) - // .await - // .unwrap(); let signed_aggregates = attestations .into_iter() diff --git a/beacon_node/network/src/network_beacon_processor/mod.rs b/beacon_node/network/src/network_beacon_processor/mod.rs index 6f53bed6c2..d8c7e01e2a 100644 --- a/beacon_node/network/src/network_beacon_processor/mod.rs +++ b/beacon_node/network/src/network_beacon_processor/mod.rs @@ -29,7 +29,7 @@ use lighthouse_network::{ Client, MessageId, NetworkGlobals, PeerId, PubsubMessage, }; use rand::prelude::SliceRandom; -use slog::{debug, error, info, trace, warn, Logger}; +use slog::{debug, error, trace, warn, Logger}; use slot_clock::ManualSlotClock; use std::path::PathBuf; use std::sync::Arc; @@ -95,7 +95,6 @@ impl NetworkBeaconProcessor { should_import: bool, seen_timestamp: Duration, ) -> Result<(), Error> { - info!(self.log, "SENDING A SINGLE ATTESTATION"); let result = self.chain.with_committee_cache( single_attestation.data.target.root, single_attestation diff --git a/consensus/types/src/attestation.rs b/consensus/types/src/attestation.rs index 20bcedd350..e205723036 100644 --- a/consensus/types/src/attestation.rs +++ b/consensus/types/src/attestation.rs @@ -626,33 +626,6 @@ pub struct SingleAttestation { } impl SingleAttestation { - /// Produces a `SingleAttestation` with empty signature and empty attester index. - pub fn empty_for_signing( - committee_index: usize, - slot: Slot, - beacon_block_root: Hash256, - source: Checkpoint, - target: Checkpoint, - ) -> Self { - Self { - committee_index, - attester_index: 0, - data: AttestationData { - slot, - index: 0, - beacon_block_root, - source, - target, - }, - signature: AggregateSignature::infinity(), - } - } - - pub fn add_signature(&mut self, signature: &AggregateSignature, committee_position: usize) { - self.attester_index = committee_position; - self.signature = signature.clone(); - } - pub fn to_attestation( &self, committee: Option,