aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/miner.cpp
diff options
context:
space:
mode:
authorpaybee <dev@payb.ee>2014-06-02 22:43:11 +0200
committerpaybee <dev@payb.ee>2014-06-02 22:43:11 +0200
commit133019cfc54f4842a030a346418056e513e6c581 (patch)
tree3a03a4efe97972c0bcb46370d4ab5506051d8393 /src/cryptonote_core/miner.cpp
parentAdded incoming_transfers RPC API method (diff)
parentMerge pull request #21 from Neozaru/master (diff)
downloadmonero-133019cfc54f4842a030a346418056e513e6c581.tar.xz
fixed conflict
Diffstat (limited to 'src/cryptonote_core/miner.cpp')
-rw-r--r--src/cryptonote_core/miner.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp
index 56b459d6e..2055bb15d 100644
--- a/src/cryptonote_core/miner.cpp
+++ b/src/cryptonote_core/miner.cpp
@@ -188,10 +188,19 @@ namespace cryptonote
return true;
}
//-----------------------------------------------------------------------------------------------------
- bool miner::is_mining()
+ bool miner::is_mining() const
{
return !m_stop;
}
+ //-----------------------------------------------------------------------------------------------------
+ const account_public_address& miner::get_mining_address() const
+ {
+ return m_mine_address;
+ }
+ //-----------------------------------------------------------------------------------------------------
+ uint32_t miner::get_threads_count() const {
+ return m_threads_total;
+ }
//-----------------------------------------------------------------------------------------------------
bool miner::start(const account_public_address& adr, size_t threads_count, const boost::thread::attributes& attrs)
{
@@ -226,12 +235,14 @@ namespace cryptonote
return true;
}
//-----------------------------------------------------------------------------------------------------
- uint64_t miner::get_speed()
+ uint64_t miner::get_speed() const
{
- if(is_mining())
+ if(is_mining()) {
return m_current_hash_rate;
- else
+ }
+ else {
return 0;
+ }
}
//-----------------------------------------------------------------------------------------------------
void miner::send_stop_signal()