mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +00:00
Add basic, not-useful websocket server
This commit is contained in:
@@ -27,6 +27,7 @@ pub struct Config {
|
||||
pub network: network::NetworkConfig,
|
||||
pub rpc: rpc::RPCConfig,
|
||||
pub rest_api: rest_api::ApiConfig,
|
||||
pub websocket_server: websocket_server::Config,
|
||||
}
|
||||
|
||||
/// Defines how the client should initialize a BeaconChain.
|
||||
@@ -96,6 +97,7 @@ impl Default for Config {
|
||||
network: NetworkConfig::new(),
|
||||
rpc: <_>::default(),
|
||||
rest_api: <_>::default(),
|
||||
websocket_server: <_>::default(),
|
||||
spec_constants: TESTNET_SPEC_CONSTANTS.into(),
|
||||
beacon_chain_start_method: <_>::default(),
|
||||
eth1_backend_method: <_>::default(),
|
||||
|
||||
@@ -229,6 +229,11 @@ where
|
||||
None
|
||||
};
|
||||
|
||||
// Start the websocket server
|
||||
let _websocket_sender = if client_config.websocket_server.enabled {
|
||||
websocket_server::start_server::<T::EthSpec>(&client_config.websocket_server, &log)?;
|
||||
};
|
||||
|
||||
let (slot_timer_exit_signal, exit) = exit_future::signal();
|
||||
if let Some(duration_to_next_slot) = beacon_chain.slot_clock.duration_to_next_slot() {
|
||||
// set up the validator work interval - start at next slot and proceed every slot
|
||||
|
||||
Reference in New Issue
Block a user