From 4e68f740584db739097f2e50c1558865733c4353 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Fri, 22 Jun 2018 10:32:32 +0300 Subject: [PATCH] print SS.self_public when starting SS node --- parity/secretstore.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/parity/secretstore.rs b/parity/secretstore.rs index e018897bd78..6fe322351aa 100644 --- a/parity/secretstore.rs +++ b/parity/secretstore.rs @@ -118,7 +118,7 @@ mod server { use std::sync::Arc; use ethcore_secretstore; use ethkey::KeyPair; - use ansi_term::Colour::Red; + use ansi_term::Colour::{Red, White}; use db; use super::{Configuration, Dependencies, NodeSecretKey, ContractAddress}; @@ -137,10 +137,6 @@ mod server { impl KeyServer { /// Create new key server pub fn new(mut conf: Configuration, deps: Dependencies) -> Result { - if conf.acl_check_contract_address.is_none() { - warn!("Running SecretStore with disabled ACL check: {}", Red.bold().paint("everyone has access to stored keys")); - } - let self_secret: Arc = match conf.self_secret.take() { Some(NodeSecretKey::Plain(secret)) => Arc::new(ethcore_secretstore::PlainNodeKeyPair::new( KeyPair::from_secret(secret).map_err(|e| format!("invalid secret: {}", e))?)), @@ -165,6 +161,11 @@ mod server { None => return Err("self secret is required when using secretstore".into()), }; + info!("Starting SecretStore node: {}", White.bold().paint(format!("{:?}", self_secret.public()))); + if conf.acl_check_contract_address.is_none() { + warn!("Running SecretStore with disabled ACL check: {}", Red.bold().paint("everyone has access to stored keys")); + } + let key_server_name = format!("{}:{}", conf.interface, conf.port); let mut cconf = ethcore_secretstore::ServiceConfiguration { listener_address: if conf.http_enabled { Some(ethcore_secretstore::NodeAddress {