mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Add test flag to override SYNC_TOLERANCE_EPOCHS for range sync testing (#7030)
Related to #6880, an issue that's usually observed on local devnets with small number of nodes. When testing range sync, I usually shutdown a node for some period of time and restart it again. However, if it's within `SYNC_TOLERANCE_EPOCHS` (8), Lighthouse would consider the node as synced, and if it may attempt to produce a block if requested by a validator - on a local devnet, nodes frequently produce blocks - when this happens, the node ends up producing a block that would revert finality and would get disconnected from peers immediately. NOTE: This is PR#7030 cherry-picked from `unstable` to `release-v7.0.0`. Run Lighthouse BN with this flag to override: ``` --sync-tolerance--epoch 0 ```
This commit is contained in:
committed by
Michael Sproul
parent
522b3cbaab
commit
fe0cf9cb67
@@ -2579,6 +2579,17 @@ fn light_client_http_server_disabled() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sync_tolerance_epochs() {
|
||||
CommandLineTest::new()
|
||||
.flag("http", None)
|
||||
.flag("sync-tolerance-epochs", Some("0"))
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(config.http_api.sync_tolerance_epochs, Some(0));
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn gui_flag() {
|
||||
CommandLineTest::new()
|
||||
|
||||
Reference in New Issue
Block a user