mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 12:28:24 +00:00
fix lints
This commit is contained in:
@@ -715,6 +715,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
||||
cx: &mut SyncNetworkContext<T>,
|
||||
error: RPCError,
|
||||
) {
|
||||
let msg = error.as_static_str();
|
||||
if let Some(pos) = self
|
||||
.parent_lookups
|
||||
.iter()
|
||||
@@ -722,11 +723,11 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
||||
{
|
||||
let mut parent_lookup = self.parent_lookups.remove(pos);
|
||||
parent_lookup.block_download_failed();
|
||||
trace!(self.log, "Parent lookup block request failed"; &parent_lookup);
|
||||
trace!(self.log, "Parent lookup block request failed"; &parent_lookup, "error" => msg);
|
||||
|
||||
self.request_parent_block(parent_lookup, cx);
|
||||
} else {
|
||||
return debug!(self.log, "RPC failure for a block parent lookup request that was not found"; "peer_id" => %peer_id);
|
||||
return debug!(self.log, "RPC failure for a block parent lookup request that was not found"; "peer_id" => %peer_id, "error" => msg);
|
||||
};
|
||||
|
||||
if let Some(pos) = self
|
||||
@@ -736,11 +737,11 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
||||
{
|
||||
let mut parent_lookup = self.parent_lookups.remove(pos);
|
||||
parent_lookup.blob_download_failed();
|
||||
trace!(self.log, "Parent lookup blobs request failed"; &parent_lookup);
|
||||
trace!(self.log, "Parent lookup blobs request failed"; &parent_lookup, "error" => msg);
|
||||
|
||||
self.request_parent_blob(parent_lookup, cx);
|
||||
} else {
|
||||
return debug!(self.log, "RPC failure for a blobs parent lookup request that was not found"; "peer_id" => %peer_id);
|
||||
return debug!(self.log, "RPC failure for a blobs parent lookup request that was not found"; "peer_id" => %peer_id, "error" => msg);
|
||||
};
|
||||
metrics::set_gauge(
|
||||
&metrics::SYNC_PARENT_BLOCK_LOOKUPS,
|
||||
|
||||
@@ -461,7 +461,7 @@ impl<const MAX_ATTEMPTS: u8, T: BeaconChainTypes> slog::Value
|
||||
{
|
||||
fn serialize(
|
||||
&self,
|
||||
record: &slog::Record,
|
||||
_record: &slog::Record,
|
||||
key: slog::Key,
|
||||
serializer: &mut dyn slog::Serializer,
|
||||
) -> slog::Result {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
use super::block_sidecar_coupling::BlocksAndBlobsRequestInfo;
|
||||
use super::manager::{Id, RequestId as SyncRequestId};
|
||||
use super::range_sync::{BatchId, ByRangeRequestType, ChainId};
|
||||
use crate::beacon_processor::Work::BlobsByRootsRequest;
|
||||
use crate::beacon_processor::WorkEvent;
|
||||
use crate::service::{NetworkMessage, RequestId};
|
||||
use crate::status::ToStatusMessage;
|
||||
@@ -15,12 +14,10 @@ use lighthouse_network::rpc::methods::{BlobsByRangeRequest, BlobsByRootRequest};
|
||||
use lighthouse_network::rpc::{BlocksByRangeRequest, BlocksByRootRequest, GoodbyeReason};
|
||||
use lighthouse_network::{Client, NetworkGlobals, PeerAction, PeerId, ReportSource, Request};
|
||||
use slog::{debug, trace, warn};
|
||||
use ssz_types::VariableList;
|
||||
use std::collections::hash_map::Entry;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::mpsc;
|
||||
use types::blob_sidecar::BlobIdentifier;
|
||||
use types::{BlobSidecar, EthSpec, Hash256, SignedBeaconBlock};
|
||||
use types::{BlobSidecar, EthSpec, SignedBeaconBlock};
|
||||
|
||||
pub struct BlocksAndBlobsByRangeResponse<T: EthSpec> {
|
||||
pub batch_id: BatchId,
|
||||
|
||||
Reference in New Issue
Block a user