mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Strict count unrealized (#3522)
## Issue Addressed Add a flag that can increase count unrealized strictness, defaults to false ## Proposed Changes Please list or describe the changes introduced by this PR. ## Additional Info Please provide any additional information. For example, future considerations or information useful for reviewers. Co-authored-by: realbigsean <seananderson33@gmail.com> Co-authored-by: sean <seananderson33@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use beacon_node::ClientConfig as Config;
|
||||
use beacon_node::{beacon_chain::CountUnrealizedFull, ClientConfig as Config};
|
||||
|
||||
use crate::exec::{CommandLineTestExec, CompletedTest};
|
||||
use eth1::Eth1Endpoint;
|
||||
@@ -178,6 +178,45 @@ fn count_unrealized_true() {
|
||||
.with_config(|config| assert!(config.chain.count_unrealized));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn count_unrealized_full_no_arg() {
|
||||
CommandLineTest::new()
|
||||
.flag("count-unrealized-full", None)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.chain.count_unrealized_full,
|
||||
CountUnrealizedFull::False
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn count_unrealized_full_false() {
|
||||
CommandLineTest::new()
|
||||
.flag("count-unrealized-full", Some("false"))
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.chain.count_unrealized_full,
|
||||
CountUnrealizedFull::False
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn count_unrealized_full_true() {
|
||||
CommandLineTest::new()
|
||||
.flag("count-unrealized-full", Some("true"))
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.chain.count_unrealized_full,
|
||||
CountUnrealizedFull::True
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reset_payload_statuses_default() {
|
||||
CommandLineTest::new()
|
||||
|
||||
Reference in New Issue
Block a user