mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 14:28:37 +00:00
Add standard RPC service
This commit is contained in:
@@ -20,7 +20,7 @@ pub struct ClientConfig {
|
||||
pub fork_choice: ForkChoiceAlgorithm,
|
||||
pub db_type: DBType,
|
||||
pub db_name: PathBuf,
|
||||
//pub rpc_conf:
|
||||
pub rpc_conf: rpc::RPCConfig,
|
||||
//pub ipc_conf:
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ impl Default for ClientConfig {
|
||||
db_type: DBType::Memory,
|
||||
// default db name for disk-based dbs
|
||||
db_name: data_dir.join("chain.db"),
|
||||
rpc_conf: rpc::RPCConfig::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,9 @@ pub mod client_types;
|
||||
pub mod error;
|
||||
pub mod notifier;
|
||||
|
||||
use beacon_chain::BeaconChain;
|
||||
pub use client_config::ClientConfig;
|
||||
pub use client_types::ClientTypes;
|
||||
|
||||
//use beacon_chain::BeaconChain;
|
||||
use beacon_chain::BeaconChain;
|
||||
use exit_future::Signal;
|
||||
use network::Service as NetworkService;
|
||||
use slog::o;
|
||||
@@ -62,6 +60,9 @@ impl<TClientType: ClientTypes> Client<TClientType> {
|
||||
network_logger,
|
||||
)?;
|
||||
|
||||
// spawn the RPC server
|
||||
rpc::start_server(&config.rpc_conf, &log);
|
||||
|
||||
Ok(Client {
|
||||
config,
|
||||
beacon_chain,
|
||||
|
||||
Reference in New Issue
Block a user