Skip to content

Commit 5e28a01

Browse files
committed
remove unecessary code path
1 parent 77560f0 commit 5e28a01

File tree

2 files changed

+4
-40
lines changed

2 files changed

+4
-40
lines changed

beacon_node/network/src/network_beacon_processor/gossip_methods.rs

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ use std::time::{Duration, Instant, SystemTime, UNIX_EPOCH};
3232
use store::hot_cold_store::HotColdDBError;
3333
use tokio::sync::mpsc;
3434
use types::{
35-
attestation::SingleAttestation, beacon_block::BlockImportSource, Attestation, AttestationRef,
36-
AttesterSlashing, BlobSidecar, DataColumnSidecar, DataColumnSubnetId, EthSpec, Hash256,
37-
IndexedAttestation, LightClientFinalityUpdate, LightClientOptimisticUpdate, ProposerSlashing,
35+
beacon_block::BlockImportSource, Attestation, AttestationRef, AttesterSlashing, BlobSidecar,
36+
DataColumnSidecar, DataColumnSubnetId, EthSpec, Hash256, IndexedAttestation,
37+
LightClientFinalityUpdate, LightClientOptimisticUpdate, ProposerSlashing,
3838
SignedAggregateAndProof, SignedBeaconBlock, SignedBlsToExecutionChange,
3939
SignedContributionAndProof, SignedVoluntaryExit, Slot, SubnetId, SyncCommitteeMessage,
4040
SyncSubnetId,
@@ -185,42 +185,6 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
185185
})
186186
}
187187

188-
#[allow(clippy::too_many_arguments)]
189-
pub fn process_gossip_single_attestation(
190-
self: Arc<Self>,
191-
message_id: MessageId,
192-
peer_id: PeerId,
193-
attestation: Box<SingleAttestation>,
194-
subnet_id: SubnetId,
195-
should_import: bool,
196-
reprocess_tx: Option<mpsc::Sender<ReprocessQueueMessage>>,
197-
seen_timestamp: Duration,
198-
) {
199-
let _ = self.chain.with_committee_cache(
200-
attestation.data.target.root,
201-
attestation.data.slot.epoch(T::EthSpec::slots_per_epoch()),
202-
|committee_cache, _| {
203-
let committees = committee_cache
204-
.get_beacon_committees_at_slot(attestation.data.slot)
205-
.unwrap_or_else(|_| vec![]);
206-
207-
let attestation = attestation.to_attestation(&committees)?;
208-
209-
self.clone().process_gossip_attestation(
210-
message_id.clone(),
211-
peer_id,
212-
Box::new(attestation),
213-
subnet_id,
214-
should_import,
215-
reprocess_tx.clone(),
216-
seen_timestamp,
217-
);
218-
219-
Ok(())
220-
},
221-
);
222-
}
223-
224188
/* Processing functions */
225189

226190
/// Process the unaggregated attestation received from the gossip network and:

beacon_node/network/src/network_beacon_processor/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
8585
.map_err(Into::into)
8686
}
8787

88-
/// Create a new `Work` event for some unaggregated attestation.
88+
/// Create a new `Work` event for a single attestation.
8989
pub fn send_single_attestation(
9090
self: &Arc<Self>,
9191
message_id: MessageId,

0 commit comments

Comments
 (0)