Merge remote-tracking branch 'origin/master' into spec-v0.12

This commit is contained in:
Michael Sproul
2020-06-26 12:08:46 +10:00
34 changed files with 196 additions and 227 deletions

View File

@@ -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 {

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}
}