mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Adds error handling to validator client service
This commit is contained in:
@@ -2,12 +2,13 @@ mod attester_service;
|
||||
mod block_producer_service;
|
||||
mod config;
|
||||
mod duties;
|
||||
pub mod error;
|
||||
mod service;
|
||||
|
||||
use crate::config::Config as ValidatorConfig;
|
||||
use clap::{App, Arg};
|
||||
use service::Service as ValidatorService;
|
||||
use slog::{o, Drain};
|
||||
use slog::{error, info, o, Drain};
|
||||
|
||||
fn main() {
|
||||
// Logging
|
||||
@@ -50,5 +51,8 @@ fn main() {
|
||||
let config = ValidatorConfig::parse_args(matches, &log).unwrap();
|
||||
|
||||
// start the validator service.
|
||||
ValidatorService::start(config, log);
|
||||
match ValidatorService::start(config, log.clone()) {
|
||||
Ok(_) => info!(log, "Validator client shutdown successfully."),
|
||||
Err(e) => error!(log, "Validator exited due to {:?}", e),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user