aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonero-project <sempre.amaro@gmail.com>2014-05-14 11:49:15 -0400
committermonero-project <sempre.amaro@gmail.com>2014-05-14 11:49:15 -0400
commit0217572cb289d52922612e0f46497c7051b203b2 (patch)
treef87bc5ea50a881028342b9cab14b25100ef872b8 /src
parentMerge pull request #9 from NoodleDoodleNoodleDoodleNoodleDoodleNoo/patch-7 (diff)
parentUpdate daemon_commands_handler.h (diff)
downloadmonero-0217572cb289d52922612e0f46497c7051b203b2.tar.xz
Merge pull request #10 from NoodleDoodleNoodleDoodleNoodleDoodleNoo/patch-8
Update daemon_commands_handler.h
Diffstat (limited to 'src')
-rw-r--r--src/daemon/daemon_commands_handler.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/daemon/daemon_commands_handler.h b/src/daemon/daemon_commands_handler.h
index dca524f77..74b671e2a 100644
--- a/src/daemon/daemon_commands_handler.h
+++ b/src/daemon/daemon_commands_handler.h
@@ -34,6 +34,7 @@ public:
m_cmd_binder.set_handler("show_hr", boost::bind(&daemon_cmmands_handler::show_hr, this, _1), "Start showing hash rate");
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("diff", boost::bind(&daemon_cmmands_handler::diff, this, _1), "Show difficulty");
}
bool start_handling()
@@ -98,6 +99,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)