diff --git a/src/cli.rs b/src/cli.rs index efcf2e2..0a3756c 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -584,19 +584,6 @@ pub struct NodeConfig { pub token: String, } -// impl Default for NodeConfig { -// fn default() -> Self { - -// NodeConfig { -// data_dir: ".".into(), -// pubkey: "".into(), -// macaroon: "".into(), -// role: Role::Admin.to_integer(), -// token: "satoshi".into(), -// } -// } -// } - impl NodeConfig { pub fn path(&self) -> String { format!("{}/data/{}", self.data_dir, self.pubkey) diff --git a/src/grpc/admin.rs b/src/grpc/admin.rs index fbe7564..a75d24e 100644 --- a/src/grpc/admin.rs +++ b/src/grpc/admin.rs @@ -8,7 +8,6 @@ // licenses. use std::sync::Arc; -use tracing::{instrument, info, error, debug}; pub use super::sensei::admin_server::{Admin, AdminServer}; use super::{ @@ -414,7 +413,6 @@ impl Admin for AdminService { Err(_err) => Err(tonic::Status::unknown("error")), } } - #[instrument(skip(self, request), fields())] async fn create_admin( &self, request: tonic::Request, @@ -422,19 +420,14 @@ impl Admin for AdminService { let request: AdminRequest = request.into_inner().into(); match self.request_context.admin_service.call(request).await { Ok(response) => { - debug!("Admin creation successful"); let response: Result = response.try_into(); response .map(Response::new) .map_err(|_err| tonic::Status::unknown("err")) } - Err(_err) => { - error!("Admin creation failed {:?}", _err); - Err(tonic::Status::unknown("error")) - } + Err(_err) => Err(tonic::Status::unknown("error")), } } - #[instrument(skip(self, request), fields())] async fn start_admin( &self, request: tonic::Request, diff --git a/src/main.rs b/src/main.rs index 4c181d2..4cc89c6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,9 +22,6 @@ mod services; mod utils; mod version; -use tracing::{info, debug, error, Level}; -use tracing_subscriber::FmtSubscriber; - use crate::chain::bitcoind_client::BitcoindClient; use crate::http::admin::add_routes as add_admin_routes; use crate::http::node::add_routes as add_node_routes; @@ -195,7 +192,6 @@ async fn main() { .await .expect("invalid bitcoind rpc config"), ); - info!("Bitcoind connected successfully"); let chain_manager = Arc::new( SenseiChainManager::new( @@ -230,7 +226,6 @@ async fn main() { let router = add_admin_routes(router); let router = add_node_routes(router); - info!("Router initialized successfully"); let router = match args.development_mode { Some(_development_mode) => router.layer( @@ -280,11 +275,9 @@ async fn main() { "manage your sensei node at http://localhost:{}/admin/nodes", port ); - - info!("Initialization complete"); if let Err(e) = server.await { - error!("Uncaught error: {:?}", e); + dbg!("Uncaught error: {:?}", e); } } diff --git a/src/services/admin.rs b/src/services/admin.rs index cbd113f..f904b0e 100644 --- a/src/services/admin.rs +++ b/src/services/admin.rs @@ -7,7 +7,6 @@ // You may not use this file except in accordance with one or both of these // licenses. -use tracing::{error}; use super::{PaginationRequest, PaginationResponse}; use crate::chain::manager::SenseiChainManager; use crate::error::Error as SenseiError; @@ -311,12 +310,9 @@ impl AdminService { let macaroon = macaroon.serialize(macaroon::Format::V2)?; - let macaroon = lightning_node.macaroon.serialize(macaroon::Format::V2)?; - if start { self.start_node(node.clone(), passphrase).await?; } - Ok(AdminResponse::CreateNode { pubkey: node.pubkey, macaroon: hex_utils::hex_str(macaroon.as_slice()),