mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
finish refactor
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
use crate::sync::manager::Id;
|
||||
use beacon_chain::blob_verification::{AsBlock, BlockWrapper};
|
||||
use lighthouse_network::rpc::methods::BlocksByRangeRequest;
|
||||
use lighthouse_network::PeerId;
|
||||
use std::collections::HashSet;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::ops::Sub;
|
||||
use strum::Display;
|
||||
use types::signed_block_and_blobs::BlockWrapper;
|
||||
use types::{Epoch, EthSpec, Slot};
|
||||
|
||||
/// The number of times to retry a batch before it is considered failed.
|
||||
|
||||
@@ -3,6 +3,7 @@ use crate::beacon_processor::{ChainSegmentProcessId, WorkEvent as BeaconWorkEven
|
||||
use crate::sync::{
|
||||
manager::Id, network_context::SyncNetworkContext, BatchOperationOutcome, BatchProcessResult,
|
||||
};
|
||||
use beacon_chain::blob_verification::BlockWrapper;
|
||||
use beacon_chain::{BeaconChainTypes, CountUnrealized};
|
||||
use fnv::FnvHashMap;
|
||||
use lighthouse_network::{PeerAction, PeerId};
|
||||
@@ -10,7 +11,6 @@ use rand::seq::SliceRandom;
|
||||
use slog::{crit, debug, o, warn};
|
||||
use std::collections::{btree_map::Entry, BTreeMap, HashSet};
|
||||
use std::hash::{Hash, Hasher};
|
||||
use types::signed_block_and_blobs::BlockWrapper;
|
||||
use types::{Epoch, EthSpec, Hash256, Slot};
|
||||
|
||||
/// Blocks are downloaded in batches from peers. This constant specifies how many epochs worth of
|
||||
|
||||
@@ -47,6 +47,7 @@ use crate::status::ToStatusMessage;
|
||||
use crate::sync::manager::Id;
|
||||
use crate::sync::network_context::SyncNetworkContext;
|
||||
use crate::sync::BatchProcessResult;
|
||||
use beacon_chain::blob_verification::BlockWrapper;
|
||||
use beacon_chain::{BeaconChain, BeaconChainTypes};
|
||||
use lighthouse_network::rpc::GoodbyeReason;
|
||||
use lighthouse_network::PeerId;
|
||||
@@ -55,7 +56,6 @@ use lru_cache::LRUTimeCache;
|
||||
use slog::{crit, debug, trace, warn};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use types::signed_block_and_blobs::BlockWrapper;
|
||||
use types::{Epoch, EthSpec, Hash256, Slot};
|
||||
|
||||
/// For how long we store failed finalized chains to prevent retries.
|
||||
|
||||
Reference in New Issue
Block a user