mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 03:31:45 +00:00
Merge remote-tracking branch 'origin/master' into spec-v0.12
This commit is contained in:
@@ -260,7 +260,7 @@ impl<T: BeaconChainTypes> AttestationService<T> {
|
||||
/// verification, re-propagates and returns false.
|
||||
pub fn should_process_attestation(
|
||||
&mut self,
|
||||
subnet: &SubnetId,
|
||||
subnet: SubnetId,
|
||||
attestation: &Attestation<T::EthSpec>,
|
||||
) -> bool {
|
||||
let exact_subnet = ExactSubnet {
|
||||
|
||||
@@ -218,11 +218,9 @@ impl<T: BeaconChainTypes> Router<T> {
|
||||
match gossip_message {
|
||||
// Attestations should never reach the router.
|
||||
PubsubMessage::AggregateAndProofAttestation(aggregate_and_proof) => {
|
||||
if let Some(gossip_verified) =
|
||||
self.processor.verify_aggregated_attestation_for_gossip(
|
||||
peer_id.clone(),
|
||||
*aggregate_and_proof.clone(),
|
||||
)
|
||||
if let Some(gossip_verified) = self
|
||||
.processor
|
||||
.verify_aggregated_attestation_for_gossip(peer_id.clone(), *aggregate_and_proof)
|
||||
{
|
||||
self.propagate_message(id, peer_id.clone());
|
||||
self.processor
|
||||
|
||||
@@ -294,7 +294,7 @@ fn spawn_service<T: BeaconChainTypes>(
|
||||
match message {
|
||||
// attestation information gets processed in the attestation service
|
||||
PubsubMessage::Attestation(ref subnet_and_attestation) => {
|
||||
let subnet = &subnet_and_attestation.0;
|
||||
let subnet = subnet_and_attestation.0;
|
||||
let attestation = &subnet_and_attestation.1;
|
||||
// checks if we have an aggregator for the slot. If so, we process
|
||||
// the attestation
|
||||
|
||||
@@ -534,7 +534,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
|
||||
// otherwise, this is a range sync issue, notify the range sync
|
||||
self.range_sync
|
||||
.inject_error(&mut self.network, peer_id.clone(), request_id);
|
||||
.inject_error(&mut self.network, peer_id, request_id);
|
||||
}
|
||||
|
||||
fn peer_disconnect(&mut self, peer_id: &PeerId) {
|
||||
@@ -672,7 +672,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
"last_peer" => format!("{:?}", parent_request.last_submitted_peer),
|
||||
);
|
||||
self.network
|
||||
.downvote_peer(parent_request.last_submitted_peer.clone());
|
||||
.downvote_peer(parent_request.last_submitted_peer);
|
||||
return;
|
||||
}
|
||||
Err(e) => {
|
||||
@@ -682,7 +682,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
"last_peer" => format!("{:?}", parent_request.last_submitted_peer),
|
||||
);
|
||||
self.network
|
||||
.downvote_peer(parent_request.last_submitted_peer.clone());
|
||||
.downvote_peer(parent_request.last_submitted_peer);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user