mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 18:21:45 +00:00
1.57.0 lints (#2850)
## Issue Addressed New rust lints ## Proposed Changes - Boxing some enum variants - removing some unused fields (is the validator lockfile unused? seemed so to me) ## Additional Info - some error fields were marked as dead code but are logged out in areas - left some dead fields in our ef test code because I assume they are useful for debugging? Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ use types::{
|
||||
SyncCommitteeMessage, SyncSubnetId,
|
||||
};
|
||||
use work_reprocessing_queue::{
|
||||
spawn_reprocess_scheduler, QueuedAggregate, QueuedBlock, QueuedUnaggregate, ReadyWork,
|
||||
spawn_reprocess_scheduler, QueuedAggregate, QueuedUnaggregate, ReadyWork,
|
||||
};
|
||||
|
||||
use worker::{Toolbox, Worker};
|
||||
@@ -72,6 +72,7 @@ mod tests;
|
||||
mod work_reprocessing_queue;
|
||||
mod worker;
|
||||
|
||||
use crate::beacon_processor::work_reprocessing_queue::QueuedBlock;
|
||||
pub use worker::{GossipAggregatePackage, GossipAttestationPackage, ProcessId};
|
||||
|
||||
/// The maximum size of the channel for work events to the `BeaconProcessor`.
|
||||
@@ -574,7 +575,7 @@ impl<T: BeaconChainTypes> std::convert::From<ReadyWork<T>> for WorkEvent<T> {
|
||||
drop_during_sync: false,
|
||||
work: Work::DelayedImportBlock {
|
||||
peer_id,
|
||||
block: Box::new(block),
|
||||
block,
|
||||
seen_timestamp,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -91,7 +91,7 @@ pub struct QueuedAggregate<T: EthSpec> {
|
||||
/// A block that arrived early and has been queued for later import.
|
||||
pub struct QueuedBlock<T: BeaconChainTypes> {
|
||||
pub peer_id: PeerId,
|
||||
pub block: GossipVerifiedBlock<T>,
|
||||
pub block: Box<GossipVerifiedBlock<T>>,
|
||||
pub seen_timestamp: Duration,
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,6 @@ pub struct GossipAttestationPackage<E: EthSpec> {
|
||||
peer_id: PeerId,
|
||||
attestation: Box<Attestation<E>>,
|
||||
subnet_id: SubnetId,
|
||||
beacon_block_root: Hash256,
|
||||
should_import: bool,
|
||||
seen_timestamp: Duration,
|
||||
}
|
||||
@@ -138,7 +137,6 @@ impl<E: EthSpec> GossipAttestationPackage<E> {
|
||||
Self {
|
||||
message_id,
|
||||
peer_id,
|
||||
beacon_block_root: attestation.data.beacon_block_root,
|
||||
attestation,
|
||||
subnet_id,
|
||||
should_import,
|
||||
@@ -830,7 +828,7 @@ impl<T: BeaconChainTypes> Worker<T> {
|
||||
if reprocess_tx
|
||||
.try_send(ReprocessQueueMessage::EarlyBlock(QueuedBlock {
|
||||
peer_id,
|
||||
block: verified_block,
|
||||
block: Box::new(verified_block),
|
||||
seen_timestamp: seen_duration,
|
||||
}))
|
||||
.is_err()
|
||||
|
||||
Reference in New Issue
Block a user