From 0871203167a7d6d7d4123283e3bccd2a5c13ac68 Mon Sep 17 00:00:00 2001 From: wowario Date: Sun, 13 Jun 2021 21:44:15 +0300 Subject: [PATCH] tidy up miner msgs --- src/cryptonote_basic/miner.cpp | 31 ++++++++++++++++++++++++-- src/daemon/command_parser_executor.cpp | 2 +- src/daemon/rpc_command_executor.cpp | 8 +++---- src/simplewallet/simplewallet.cpp | 2 +- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index fd70b9909..47035cd2c 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -539,7 +539,7 @@ namespace cryptonote bool rx_set = false; MLOG_SET_THREAD_NAME(std::string("[miner ") + std::to_string(th_local_index) + "]"); - MGINFO("Miner thread was started ["<< th_local_index << "]"); + MGINFO_GREEN("*Spins roulette wheel*... Mining started. Good luck!"); uint32_t nonce = m_starter_nonce + th_local_index; uint64_t height = 0; difficulty_type local_diff = 0; @@ -623,7 +623,34 @@ namespace cryptonote { //we lucky! ++m_config.current_extra_message_index; - MGINFO_GREEN("Found block " << get_block_hash(b) << " at height " << height << " for difficulty: " << local_diff); + MGINFO_YELLOW(ENDL << + " ╦ ╦┬┌┐┌┐┌┌─┐┬─┐ ┬ ┬┬┌┐┌┐┌┌─┐┬─┐ ┌─┐┬ ┬┬┌─┐┬┌─┌─┐┌┐┌ ┌┬┐┬┌┐┌┐┌┌─┐┬─┐ ||\n" + " ║║║││││││├┤ ├┬┘ │││││││││├┤ ├┬┘ │ ├─┤││ ├┴┐├┤ │││ ││││││││├┤ ├┬┘ ||\n" + " ╚╩╝┴┘└┘└┘└─┘┴└─ └┴┘┴┘└┘└┘└─┘┴└─ └─┘┴ ┴┴└─┘┴ ┴└─┘┘└┘ ─┴┘┴┘└┘└┘└─┘┴└─ ()\n" + << ENDL); + MGINFO_MAGENTA(ENDL << + "\n\n" + " //@@@@@@@@@@@@@@@@@// \n" + " //%%%%%%%%%%%%%%%%%%%%%%%%%%%/% \n" + " @/%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/ \n" + " //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/& \n" + " /%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/ \n" + " &/%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%/ \n" + " ////////////%%%%%%%%%%%%%%%%%%%%%%#//////////// \n" + " /@@////////@@/%%%%%%%%%%%%%%%%%%%%%/@@////////@@/ \n" + " /@@////////@@/%%%%%%%%/@@#/%%%%%%%%/@@////////@@/ \n" + " /@@/////////@@/%%%%%%/@@@/@@@/%%%%%%/@@////////#@/ \n" + " /@&////////@@/%%%%/@@@/////@@@/%%%%/@@////////@@/ \n" + " /@@////////@@/%(/@@///////////@@/%%/@@////////@@/ \n" + " /@@////////@/@@@///////////////@@&@@////////@@/ \n" + " /@@///////@@@///////////////////@@@///////@@/ \n" + " /@@//////@///////////////////////@//////@@/ \n" + " #/@@/////////////////////////////////@@/ \n" + " /@@@///////////////////////////@@@/ \n" + " %/@@@@///////////////////@@@@/ \n" + " //@@@@@@@@@@@@@@@@@// \n" + << ENDL); + MGINFO_GREEN("Awesome, you won a block reward!\n" << get_block_hash(b) << " at height " << height); cryptonote::block_verification_context bvc; if(!m_phandler->handle_block_found(b, bvc) || !bvc.m_added_to_main_chain) { diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 7ed878c88..4aeaf4e74 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -417,7 +417,7 @@ bool t_command_parser_executor::start_mining(const std::vector& arg } if (info.is_subaddress) { - tools::fail_msg_writer() << "subaddress for mining reward is not yet supported!" << std::endl; + tools::fail_msg_writer() << "You can't use a subaddress to mine. You need to use your wallet's main address, which starts with \"Wo\"." << std::endl; return true; } if(nettype != cryptonote::MAINNET) diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 94ed7aacf..8b623d504 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -590,13 +590,13 @@ bool t_rpc_command_executor::mining_status() { } else { - tools::msg_writer() << "Mining at " << get_mining_speed(mres.speed) << " with " << mres.threads_count << " threads"; + tools::msg_writer() << "\nMining at " << get_mining_speed(mres.speed) << " with " << mres.threads_count << " threads"; } tools::msg_writer() << "PoW algorithm: " << mres.pow_algorithm; if (mres.active || mres.is_background_mining_enabled) { - tools::msg_writer() << "Mining address: " << mres.address; + tools::msg_writer() << "Mining address:\n" << mres.address; } if (mres.is_background_mining_enabled) @@ -614,8 +614,8 @@ bool t_rpc_command_executor::mining_status() { uint64_t daily = 86400ull / mres.block_target * mres.block_reward * ratio; uint64_t monthly = 86400ull / mres.block_target * 30.5 * mres.block_reward * ratio; uint64_t yearly = 86400ull / mres.block_target * 356 * mres.block_reward * ratio; - tools::msg_writer() << "Expected: " << cryptonote::print_money(daily) << " monero daily, " - << cryptonote::print_money(monthly) << " monero monthly, " << cryptonote::print_money(yearly) << " yearly"; + tools::msg_writer() << "Expected: " << cryptonote::print_money(daily) << " WOW daily, " + << cryptonote::print_money(monthly) << " WOW monthly, " << cryptonote::print_money(yearly) << " yearly"; } return true; diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index bfa091a6e..48b53aba0 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -773,7 +773,7 @@ bool simple_wallet::spendkey(const std::vector &args/* = std::vecto std::cout << "secret: On device. Not available" << std::endl; } else { SCOPED_WALLET_UNLOCK(); - printf("secret: "); + printf("secret (key used for mining): "); print_secret_key(m_wallet->get_account().get_keys().m_spend_secret_key); putchar('\n'); }