mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-01 05:37:05 +00:00
resolve merge conlfict
This commit is contained in:
@@ -50,7 +50,6 @@ use crate::sync::block_lookups::{
|
||||
use crate::sync::custody_backfill_sync::CustodyBackFillSync;
|
||||
use crate::sync::network_context::{PeerGroup, RpcResponseResult};
|
||||
use beacon_chain::block_verification_types::AsBlock;
|
||||
use beacon_chain::validator_monitor::timestamp_now;
|
||||
use beacon_chain::{
|
||||
AvailabilityProcessingStatus, BeaconChain, BeaconChainTypes, BlockError, EngineState,
|
||||
};
|
||||
@@ -880,7 +879,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
BlockComponent::Block(DownloadResult {
|
||||
value: block.block_cloned(),
|
||||
block_root,
|
||||
seen_timestamp: timestamp_now(),
|
||||
seen_timestamp: self.chain.slot_clock.now_duration().unwrap_or_default(),
|
||||
peer_group: PeerGroup::from_single(peer_id),
|
||||
}),
|
||||
);
|
||||
@@ -898,7 +897,7 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
BlockComponent::Blob(DownloadResult {
|
||||
value: blob,
|
||||
block_root,
|
||||
seen_timestamp: timestamp_now(),
|
||||
seen_timestamp: self.chain.slot_clock.now_duration().unwrap_or_default(),
|
||||
peer_group: PeerGroup::from_single(peer_id),
|
||||
}),
|
||||
);
|
||||
@@ -918,7 +917,11 @@ impl<T: BeaconChainTypes> SyncManager<T> {
|
||||
BlockComponent::DataColumn(DownloadResult {
|
||||
value: data_column,
|
||||
block_root,
|
||||
seen_timestamp: timestamp_now(),
|
||||
seen_timestamp: self
|
||||
.chain
|
||||
.slot_clock
|
||||
.now_duration()
|
||||
.unwrap_or_default(),
|
||||
peer_group: PeerGroup::from_single(peer_id),
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -1831,8 +1831,8 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
|
||||
};
|
||||
|
||||
let result = columns_by_range_peers_to_request
|
||||
.iter()
|
||||
.filter_map(|(peer_id, _)| {
|
||||
.keys()
|
||||
.filter_map(|peer_id| {
|
||||
self.send_data_columns_by_range_request(
|
||||
*peer_id,
|
||||
request.clone(),
|
||||
|
||||
@@ -2,11 +2,11 @@ use crate::sync::network_context::{
|
||||
DataColumnsByRootRequestId, DataColumnsByRootSingleBlockRequest,
|
||||
};
|
||||
use beacon_chain::BeaconChainTypes;
|
||||
use beacon_chain::validator_monitor::timestamp_now;
|
||||
use fnv::FnvHashMap;
|
||||
use lighthouse_network::PeerId;
|
||||
use lighthouse_network::service::api_types::{CustodyId, DataColumnsByRootRequester};
|
||||
use parking_lot::RwLock;
|
||||
use slot_clock::SlotClock;
|
||||
use std::collections::HashSet;
|
||||
use std::hash::{BuildHasher, RandomState};
|
||||
use std::time::{Duration, Instant};
|
||||
@@ -223,7 +223,10 @@ impl<T: BeaconChainTypes> ActiveCustodyRequest<T> {
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
let peer_group = PeerGroup::from_set(peers);
|
||||
let max_seen_timestamp = seen_timestamps.into_iter().max().unwrap_or(timestamp_now());
|
||||
let max_seen_timestamp = seen_timestamps
|
||||
.into_iter()
|
||||
.max()
|
||||
.unwrap_or_else(|| cx.chain.slot_clock.now_duration().unwrap_or_default());
|
||||
return Ok(Some((columns, peer_group, max_seen_timestamp)));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use std::time::Instant;
|
||||
use std::{collections::hash_map::Entry, hash::Hash};
|
||||
|
||||
use beacon_chain::validator_monitor::timestamp_now;
|
||||
use fnv::FnvHashMap;
|
||||
use lighthouse_network::PeerId;
|
||||
use slot_clock::timestamp_now;
|
||||
use strum::IntoStaticStr;
|
||||
use tracing::{Span, debug};
|
||||
use types::{Hash256, Slot};
|
||||
|
||||
Reference in New Issue
Block a user