From 142c274d4e977367e2eee6afaa74133fd248f547 Mon Sep 17 00:00:00 2001 From: Stanimal Date: Wed, 22 Jun 2022 10:29:26 +0200 Subject: [PATCH] feat(miner): friendlier miner output --- applications/tari_miner/src/main.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/applications/tari_miner/src/main.rs b/applications/tari_miner/src/main.rs index 9de5a512e2..b98fa355da 100644 --- a/applications/tari_miner/src/main.rs +++ b/applications/tari_miner/src/main.rs @@ -179,7 +179,7 @@ async fn main_inner() -> Result<(), ExitError> { sleep(config.wait_timeout()).await; }, Ok(submitted) => { - info!(target: LOG_TARGET, "Found block"); + info!(target: LOG_TARGET, "💰 Found block"); if submitted { blocks_found += 1; } @@ -196,12 +196,10 @@ async fn main_inner() -> Result<(), ExitError> { async fn connect(config: &MinerConfig) -> Result<(BaseNodeClient, WalletClient), MinerError> { let base_node_addr = multiaddr_to_socketaddr(&config.base_node_addr)?; - println!("Connecting to base node at {}", base_node_addr); - error!(target: LOG_TARGET, "Connecting to base node at {}", base_node_addr); + info!(target: LOG_TARGET, "🔗 Connecting to base node at {}", base_node_addr); let node_conn = BaseNodeClient::connect(format!("http://{}", base_node_addr)).await?; let wallet_addr = multiaddr_to_socketaddr(&config.wallet_addr)?; - println!("Connecting to wallet at {}", config.wallet_addr); - error!(target: LOG_TARGET, "Connecting to wallet at {}", wallet_addr); + info!(target: LOG_TARGET, "👛 Connecting to wallet at {}", wallet_addr); let wallet_conn = WalletClient::connect(format!("http://{}", wallet_addr)).await?; Ok((node_conn, wallet_conn)) @@ -316,7 +314,7 @@ async fn display_report(report: &MiningReport, num_mining_threads: usize) { let hashrate = report.hashes as f64 / report.elapsed.as_micros() as f64; info!( target: LOG_TARGET, - "Miner {} reported {:.2}MH/s with total {:.2}MH/s over {} threads. Height: {}. Target: {})", + "⛏ Miner {} reported {:.2}MH/s with total {:.2}MH/s over {} threads. Height: {}. Target: {})", report.miner, hashrate, hashrate * num_mining_threads as f64,