mirror of
				https://git.wownero.com/wownero/wownero.git
				synced 2024-08-15 01:03:23 +00:00 
			
		
		
		
	tidy up miner msgs
This commit is contained in:
		
							parent
							
								
									48841789cb
								
							
						
					
					
						commit
						ff34adf8b7
					
				
					 4 changed files with 35 additions and 8 deletions
				
			
		| 
						 | 
					@ -539,7 +539,7 @@ namespace cryptonote
 | 
				
			||||||
    bool rx_set = false;
 | 
					    bool rx_set = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MLOG_SET_THREAD_NAME(std::string("[miner ") + std::to_string(th_local_index) + "]");
 | 
					    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;
 | 
					    uint32_t nonce = m_starter_nonce + th_local_index;
 | 
				
			||||||
    uint64_t height = 0;
 | 
					    uint64_t height = 0;
 | 
				
			||||||
    difficulty_type local_diff = 0;
 | 
					    difficulty_type local_diff = 0;
 | 
				
			||||||
| 
						 | 
					@ -623,7 +623,34 @@ namespace cryptonote
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        //we lucky!
 | 
					        //we lucky!
 | 
				
			||||||
        ++m_config.current_extra_message_index;
 | 
					        ++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;
 | 
					        cryptonote::block_verification_context bvc;
 | 
				
			||||||
        if(!m_phandler->handle_block_found(b, bvc) || !bvc.m_added_to_main_chain)
 | 
					        if(!m_phandler->handle_block_found(b, bvc) || !bvc.m_added_to_main_chain)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -417,7 +417,7 @@ bool t_command_parser_executor::start_mining(const std::vector<std::string>& arg
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if (info.is_subaddress)
 | 
					  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;
 | 
					    return true;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  if(nettype != cryptonote::MAINNET)
 | 
					  if(nettype != cryptonote::MAINNET)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -590,13 +590,13 @@ bool t_rpc_command_executor::mining_status() {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  else
 | 
					  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;
 | 
					  tools::msg_writer() << "PoW algorithm: " << mres.pow_algorithm;
 | 
				
			||||||
  if (mres.active || mres.is_background_mining_enabled)
 | 
					  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)
 | 
					  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 daily = 86400ull / mres.block_target * mres.block_reward * ratio;
 | 
				
			||||||
    uint64_t monthly = 86400ull / mres.block_target * 30.5 * 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;
 | 
					    uint64_t yearly = 86400ull / mres.block_target * 356 * mres.block_reward * ratio;
 | 
				
			||||||
    tools::msg_writer() << "Expected: " << cryptonote::print_money(daily) << " monero daily, "
 | 
					    tools::msg_writer() << "Expected: " << cryptonote::print_money(daily) << " WOW daily, "
 | 
				
			||||||
        << cryptonote::print_money(monthly) << " monero monthly, " << cryptonote::print_money(yearly) << " yearly";
 | 
					        << cryptonote::print_money(monthly) << " WOW monthly, " << cryptonote::print_money(yearly) << " yearly";
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -818,7 +818,7 @@ bool simple_wallet::spendkey(const std::vector<std::string> &args/* = std::vecto
 | 
				
			||||||
    std::cout << "secret: On device. Not available" << std::endl;
 | 
					    std::cout << "secret: On device. Not available" << std::endl;
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    SCOPED_WALLET_UNLOCK();
 | 
					    SCOPED_WALLET_UNLOCK();
 | 
				
			||||||
    printf("secret: ");
 | 
					    printf("secret (key used for mining): ");
 | 
				
			||||||
    print_secret_key(m_wallet->get_account().get_keys().m_spend_secret_key);
 | 
					    print_secret_key(m_wallet->get_account().get_keys().m_spend_secret_key);
 | 
				
			||||||
    putchar('\n');
 | 
					    putchar('\n');
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue