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