mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
resolve merge conflicts between untstable and release-v7.0.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "lighthouse"
|
||||
version = "7.0.0-beta.0"
|
||||
version = "7.0.0-beta.4"
|
||||
authors = ["Sigma Prime <contact@sigmaprime.io>"]
|
||||
edition = { workspace = true }
|
||||
autotests = false
|
||||
|
||||
@@ -1873,7 +1873,7 @@ fn block_cache_size_flag() {
|
||||
fn state_cache_size_default() {
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.store.state_cache_size, new_non_zero_usize(128)));
|
||||
.with_config(|config| assert_eq!(config.store.state_cache_size, new_non_zero_usize(32)));
|
||||
}
|
||||
#[test]
|
||||
fn state_cache_size_flag() {
|
||||
@@ -1883,6 +1883,21 @@ fn state_cache_size_flag() {
|
||||
.with_config(|config| assert_eq!(config.store.state_cache_size, new_non_zero_usize(64)));
|
||||
}
|
||||
#[test]
|
||||
fn state_cache_headroom_default() {
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.store.state_cache_headroom, new_non_zero_usize(1)));
|
||||
}
|
||||
#[test]
|
||||
fn state_cache_headroom_flag() {
|
||||
CommandLineTest::new()
|
||||
.flag("state-cache-headroom", Some("16"))
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(config.store.state_cache_headroom, new_non_zero_usize(16))
|
||||
});
|
||||
}
|
||||
#[test]
|
||||
fn historic_state_cache_size_flag() {
|
||||
CommandLineTest::new()
|
||||
.flag("historic-state-cache-size", Some("4"))
|
||||
@@ -1972,7 +1987,7 @@ fn prune_blobs_on_startup_false() {
|
||||
fn epochs_per_blob_prune_default() {
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert!(config.store.epochs_per_blob_prune == 1));
|
||||
.with_config(|config| assert_eq!(config.store.epochs_per_blob_prune, 256));
|
||||
}
|
||||
#[test]
|
||||
fn epochs_per_blob_prune_on_startup_five() {
|
||||
@@ -2796,4 +2811,41 @@ fn data_column_publishing_delay_for_testing() {
|
||||
Some(Duration::from_secs_f64(3.5f64))
|
||||
);
|
||||
});
|
||||
fn invalid_block_roots_flag() {
|
||||
let dir = TempDir::new().expect("Unable to create temporary directory");
|
||||
let mut file =
|
||||
File::create(dir.path().join("invalid-block-roots")).expect("Unable to create file");
|
||||
file.write_all(b"2db899881ed8546476d0b92c6aa9110bea9a4cd0dbeb5519eb0ea69575f1f359, 2db899881ed8546476d0b92c6aa9110bea9a4cd0dbeb5519eb0ea69575f1f358, 0x3db899881ed8546476d0b92c6aa9110bea9a4cd0dbeb5519eb0ea69575f1f358")
|
||||
.expect("Unable to write to file");
|
||||
CommandLineTest::new()
|
||||
.flag(
|
||||
"invalid-block-roots",
|
||||
dir.path().join("invalid-block-roots").as_os_str().to_str(),
|
||||
)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.chain.invalid_block_roots.len(), 3))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_block_roots_default_holesky() {
|
||||
use beacon_node::beacon_chain::chain_config::INVALID_HOLESKY_BLOCK_ROOT;
|
||||
CommandLineTest::new()
|
||||
.flag("network", Some("holesky"))
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(config.chain.invalid_block_roots.len(), 1);
|
||||
assert!(config
|
||||
.chain
|
||||
.invalid_block_roots
|
||||
.contains(&*INVALID_HOLESKY_BLOCK_ROOT));
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_block_roots_default_mainnet() {
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert!(config.chain.invalid_block_roots.is_empty());
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user