mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Merge remote-tracking branch 'origin/staging' into capella-update
This commit is contained in:
@@ -1418,7 +1418,7 @@ fn slasher_slot_offset_flag() {
|
||||
CommandLineTest::new()
|
||||
.flag("slasher", None)
|
||||
.flag("slasher-slot-offset", Some("11.25"))
|
||||
.run()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
let slasher_config = config.slasher.as_ref().unwrap();
|
||||
assert_eq!(slasher_config.slot_offset, 11.25);
|
||||
@@ -1430,7 +1430,7 @@ fn slasher_slot_offset_nan_flag() {
|
||||
CommandLineTest::new()
|
||||
.flag("slasher", None)
|
||||
.flag("slasher-slot-offset", Some("NaN"))
|
||||
.run();
|
||||
.run_with_zero_port();
|
||||
}
|
||||
#[test]
|
||||
fn slasher_history_length_flag() {
|
||||
@@ -1465,7 +1465,7 @@ fn slasher_attestation_cache_size_flag() {
|
||||
CommandLineTest::new()
|
||||
.flag("slasher", None)
|
||||
.flag("slasher-att-cache-size", Some("10000"))
|
||||
.run()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
let slasher_config = config
|
||||
.slasher
|
||||
@@ -1569,23 +1569,25 @@ fn ensure_panic_on_failed_launch() {
|
||||
|
||||
#[test]
|
||||
fn enable_proposer_re_orgs_default() {
|
||||
CommandLineTest::new().run().with_config(|config| {
|
||||
assert_eq!(
|
||||
config.chain.re_org_threshold,
|
||||
Some(DEFAULT_RE_ORG_THRESHOLD)
|
||||
);
|
||||
assert_eq!(
|
||||
config.chain.re_org_max_epochs_since_finalization,
|
||||
DEFAULT_RE_ORG_MAX_EPOCHS_SINCE_FINALIZATION,
|
||||
);
|
||||
});
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.chain.re_org_threshold,
|
||||
Some(DEFAULT_RE_ORG_THRESHOLD)
|
||||
);
|
||||
assert_eq!(
|
||||
config.chain.re_org_max_epochs_since_finalization,
|
||||
DEFAULT_RE_ORG_MAX_EPOCHS_SINCE_FINALIZATION,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn disable_proposer_re_orgs() {
|
||||
CommandLineTest::new()
|
||||
.flag("disable-proposer-reorgs", None)
|
||||
.run()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.chain.re_org_threshold, None));
|
||||
}
|
||||
|
||||
@@ -1593,7 +1595,7 @@ fn disable_proposer_re_orgs() {
|
||||
fn proposer_re_org_threshold() {
|
||||
CommandLineTest::new()
|
||||
.flag("proposer-reorg-threshold", Some("90"))
|
||||
.run()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.chain.re_org_threshold.unwrap().0, 90));
|
||||
}
|
||||
|
||||
@@ -1601,7 +1603,7 @@ fn proposer_re_org_threshold() {
|
||||
fn proposer_re_org_max_epochs_since_finalization() {
|
||||
CommandLineTest::new()
|
||||
.flag("proposer-reorg-epochs-since-finalization", Some("8"))
|
||||
.run()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.chain.re_org_max_epochs_since_finalization.as_u64(),
|
||||
|
||||
Reference in New Issue
Block a user