mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Merge remote-tracking branch 'origin/release-v7.0.0' into unstable
This commit is contained in:
@@ -107,13 +107,6 @@ use warp_utils::{query::multi_key_query, reject::convert_rejection, uor::Unifyin
|
||||
|
||||
const API_PREFIX: &str = "eth";
|
||||
|
||||
/// If the node is within this many epochs from the head, we declare it to be synced regardless of
|
||||
/// the network sync state.
|
||||
///
|
||||
/// This helps prevent attacks where nodes can convince us that we're syncing some non-existent
|
||||
/// finalized head.
|
||||
const DEFAULT_SYNC_TOLERANCE_EPOCHS: u64 = 8;
|
||||
|
||||
/// A custom type which allows for both unsecured and TLS-enabled HTTP servers.
|
||||
type HttpServer = (SocketAddr, Pin<Box<dyn Future<Output = ()> + Send>>);
|
||||
|
||||
@@ -461,10 +454,8 @@ pub fn serve<T: BeaconChainTypes>(
|
||||
)
|
||||
})?;
|
||||
|
||||
let sync_tolerance_epochs = config
|
||||
.sync_tolerance_epochs
|
||||
.unwrap_or(DEFAULT_SYNC_TOLERANCE_EPOCHS);
|
||||
let tolerance = sync_tolerance_epochs * T::EthSpec::slots_per_epoch();
|
||||
let tolerance =
|
||||
chain.config.sync_tolerance_epochs * T::EthSpec::slots_per_epoch();
|
||||
|
||||
if head_slot + tolerance >= current_slot {
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user