mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 22:49:34 +00:00
API for LightClientBootstrap, LightClientFinalityUpdate, LightClientOptimisticUpdate and light client events (#3954)
* rebase and add comment * conditional test * test * optimistic chould be working now * finality should be working now * try again * try again * clippy fix * add lc bootstrap beacon api * add lc optimistic/finality update to events * fmt * That error isn't occuring on my computer but I think this should fix it * Add missing test file * Update light client types to comply with Altair light client spec. * Fix test compilation * Support deserializing light client structures for the Bellatrix fork * Move `get_light_client_bootstrap` logic to `BeaconChain`. `LightClientBootstrap` API to return `ForkVersionedResponse`. * Misc fixes. - log cleanup - move http_api config mutation to `config::get_config` for consistency - fix light client API responses * Add light client bootstrap API test and fix existing ones. * Fix test for `light-client-server` http api config. * Appease clippy * Efficiency improvement when retrieving beacon state. --------- Co-authored-by: Jimmy Chen <jchen.tc@gmail.com>
This commit is contained in:
@@ -2346,7 +2346,10 @@ fn sync_eth1_chain_disable_deposit_contract_sync_flag() {
|
||||
fn light_client_server_default() {
|
||||
CommandLineTest::new()
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.network.enable_light_client_server, false));
|
||||
.with_config(|config| {
|
||||
assert_eq!(config.network.enable_light_client_server, false);
|
||||
assert_eq!(config.http_api.enable_light_client_server, false);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -2354,7 +2357,20 @@ fn light_client_server_enabled() {
|
||||
CommandLineTest::new()
|
||||
.flag("light-client-server", None)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| assert_eq!(config.network.enable_light_client_server, true));
|
||||
.with_config(|config| {
|
||||
assert_eq!(config.network.enable_light_client_server, true);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn light_client_http_server_enabled() {
|
||||
CommandLineTest::new()
|
||||
.flag("http", None)
|
||||
.flag("light-client-server", None)
|
||||
.run_with_zero_port()
|
||||
.with_config(|config| {
|
||||
assert_eq!(config.http_api.enable_light_client_server, true);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user