mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-03 21:04:28 +00:00
Removed unusued codepaths
This commit is contained in:
@@ -155,10 +155,6 @@ async fn attestations_across_fork_with_skip_slots() {
|
|||||||
.post_beacon_pool_attestations_v1(&unaggregated_attestations)
|
.post_beacon_pool_attestations_v1(&unaggregated_attestations)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
// client
|
|
||||||
// .post_beacon_pool_attestations_v2(&unaggregated_attestations, fork_name)
|
|
||||||
// .await
|
|
||||||
// .unwrap();
|
|
||||||
|
|
||||||
let signed_aggregates = attestations
|
let signed_aggregates = attestations
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ use lighthouse_network::{
|
|||||||
Client, MessageId, NetworkGlobals, PeerId, PubsubMessage,
|
Client, MessageId, NetworkGlobals, PeerId, PubsubMessage,
|
||||||
};
|
};
|
||||||
use rand::prelude::SliceRandom;
|
use rand::prelude::SliceRandom;
|
||||||
use slog::{debug, error, info, trace, warn, Logger};
|
use slog::{debug, error, trace, warn, Logger};
|
||||||
use slot_clock::ManualSlotClock;
|
use slot_clock::ManualSlotClock;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@@ -95,7 +95,6 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
|
|||||||
should_import: bool,
|
should_import: bool,
|
||||||
seen_timestamp: Duration,
|
seen_timestamp: Duration,
|
||||||
) -> Result<(), Error<T::EthSpec>> {
|
) -> Result<(), Error<T::EthSpec>> {
|
||||||
info!(self.log, "SENDING A SINGLE ATTESTATION");
|
|
||||||
let result = self.chain.with_committee_cache(
|
let result = self.chain.with_committee_cache(
|
||||||
single_attestation.data.target.root,
|
single_attestation.data.target.root,
|
||||||
single_attestation
|
single_attestation
|
||||||
|
|||||||
@@ -626,33 +626,6 @@ pub struct SingleAttestation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl 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<E: EthSpec>(
|
pub fn to_attestation<E: EthSpec>(
|
||||||
&self,
|
&self,
|
||||||
committee: Option<BeaconCommittee>,
|
committee: Option<BeaconCommittee>,
|
||||||
|
|||||||
Reference in New Issue
Block a user