tidy up miner msgs

This commit is contained in:
wowario 2021-06-13 21:44:15 +03:00
parent de2a8c65cf
commit 0871203167
No known key found for this signature in database
GPG Key ID: 793504B449C69220
4 changed files with 35 additions and 8 deletions

View File

@ -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)
{

View File

@ -417,7 +417,7 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& 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)

View File

@ -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;

View File

@ -773,7 +773,7 @@ bool simple_wallet::spendkey(const std::vector<std::string> &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');
}