Refactor main validator service

This commit is contained in:
Age Manning
2019-03-29 23:45:53 +11:00
parent 9cdb7bb716
commit e418cd1183
5 changed files with 294 additions and 291 deletions

View File

@@ -8,6 +8,7 @@ mod signer;
use crate::config::Config as ValidatorClientConfig;
use clap::{App, Arg};
use protos::services_grpc::ValidatorServiceClient;
use service::Service as ValidatorService;
use slog::{error, info, o, Drain};
@@ -53,7 +54,8 @@ fn main() {
.expect("Unable to build a configuration for the validator client.");
// start the validator service.
match ValidatorService::start(config, log.clone()) {
// this specifies the GRPC type to use as the duty manager beacon node.
match ValidatorService::<ValidatorServiceClient>::start(config, log.clone()) {
Ok(_) => info!(log, "Validator client shutdown successfully."),
Err(e) => error!(log, "Validator exited due to: {}", e.to_string()),
}