diff options
author | Antonio Juarez <antonio.maria.juarez@live.com> | 2014-04-07 16:02:15 +0100 |
---|---|---|
committer | Antonio Juarez <antonio.maria.juarez@live.com> | 2014-04-07 16:02:15 +0100 |
commit | a401a02ddb3fb045d998cf650292cab3b3ebfd58 (patch) | |
tree | 61d021af997193aba90b95b70836c2d031334aff /src/cryptonote_core/miner.cpp | |
parent | json rpc for wallet and bugfix (diff) | |
download | monero-a401a02ddb3fb045d998cf650292cab3b3ebfd58.tar.xz |
Improvements in JSON RPC
Diffstat (limited to 'src/cryptonote_core/miner.cpp')
-rw-r--r-- | src/cryptonote_core/miner.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp index a882e1899..142c81f68 100644 --- a/src/cryptonote_core/miner.cpp +++ b/src/cryptonote_core/miner.cpp @@ -48,7 +48,8 @@ namespace cryptonote m_last_hr_merge_time(0), m_hashes(0), m_do_print_hashrate(false), - m_do_mining(false) + m_do_mining(false), + m_current_hash_rate(0) { } @@ -225,7 +226,10 @@ namespace cryptonote //----------------------------------------------------------------------------------------------------- uint64_t miner::get_speed() { - return m_current_hash_rate; + if(is_mining()) + return m_current_hash_rate; + else + return 0; } //----------------------------------------------------------------------------------------------------- void miner::send_stop_signal() |