This commit is contained in:
aeonix
2014-06-06 23:54:02 -07:00
parent 380b9a52d1
commit eb3c4e29f5
28 changed files with 2968 additions and 71 deletions
+12
View File
@@ -36,6 +36,7 @@ public:
m_cmd_binder.set_handler("hide_hr", boost::bind(&daemon_cmmands_handler::hide_hr, this, _1), "Stop showing hash rate");
m_cmd_binder.set_handler("save", boost::bind(&daemon_cmmands_handler::save, this, _1), "Save blockchain");
m_cmd_binder.set_handler("set_log", boost::bind(&daemon_cmmands_handler::set_log, this, _1), "set_log <level> - Change current log detalization level, <level> is a number 0-4");
m_cmd_binder.set_handler("diff", boost::bind(&daemon_cmmands_handler::diff, this, _1), "Show difficulty");
}
bool start_handling()
@@ -101,6 +102,17 @@ private:
return true;
}
//--------------------------------------------------------------------------------
bool diff(const std::vector<std::string>& args)
{
cryptonote::difficulty_type difficulty = m_srv.get_payload_object().get_core().get_blockchain_storage().get_difficulty_for_next_block();
uint64_t height = m_srv.get_payload_object().get_core().get_blockchain_storage().get_current_blockchain_height();
LOG_PRINT_GREEN("BH: " << height << ", DIFF: " << difficulty
<< ", HR: " << (int) difficulty / 60L << " H/s", LOG_LEVEL_0);
return true;
}
//--------------------------------------------------------------------------------
bool print_bc_outs(const std::vector<std::string>& args)
{
if(args.size() != 1)