mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-29 02:33:48 +00:00
Use sync_tolerance_epochs flag to control the proposer prep routines (#7044)
Replace the `2 + 2 == 5` hacks from `holesky-rescue` and use the existing `sync_tolerance_epochs` flag to control the proposer prep routines.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::exec::{CommandLineTestExec, CompletedTest};
|
||||
use beacon_node::beacon_chain::chain_config::{
|
||||
DisallowedReOrgOffsets, DEFAULT_RE_ORG_CUTOFF_DENOMINATOR, DEFAULT_RE_ORG_HEAD_THRESHOLD,
|
||||
DEFAULT_RE_ORG_MAX_EPOCHS_SINCE_FINALIZATION,
|
||||
DEFAULT_RE_ORG_MAX_EPOCHS_SINCE_FINALIZATION, DEFAULT_SYNC_TOLERANCE_EPOCHS,
|
||||
};
|
||||
use beacon_node::{
|
||||
beacon_chain::graffiti_calculator::GraffitiOrigin,
|
||||
@@ -2586,7 +2586,20 @@ fn sync_tolerance_epochs() {
|
||||
.flag("sync-tolerance-epochs", Some("0"))
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(config.http_api.sync_tolerance_epochs, Some(0));
|
||||
assert_eq!(config.chain.sync_tolerance_epochs, 0);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sync_tolerance_epochs_default() {
|
||||
CommandLineTest::new()
|
||||
.flag("http", None)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.chain.sync_tolerance_epochs,
|
||||
DEFAULT_SYNC_TOLERANCE_EPOCHS
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user