aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoodleDoodleNoodleDoodleNoodleDoodleNoo <xeven77@outlook.com>2014-06-16 03:22:27 -0700
committerNoodleDoodleNoodleDoodleNoodleDoodleNoo <xeven77@outlook.com>2014-06-16 03:22:27 -0700
commit802d58054fd53a2907a03170cdb5c9b49098d0ad (patch)
tree3f4c35cdd21564423479d0d987413f3ed5ce5cd9
parentUpdate miner.cpp (diff)
downloadmonero-802d58054fd53a2907a03170cdb5c9b49098d0ad.tar.xz
Revert "Update miner.cpp"
This reverts commit c0520ad63d71f94bc78a119c61ade30876e95ed6.
-rw-r--r--src/cryptonote_core/miner.cpp24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp
index d021b05bd..56b459d6e 100644
--- a/src/cryptonote_core/miner.cpp
+++ b/src/cryptonote_core/miner.cpp
@@ -23,8 +23,7 @@ using namespace epee;
#include "miner.h"
-extern "C" void slow_hash_allocate_state();
-extern "C" void slow_hash_free_state();
+
namespace cryptonote
{
@@ -189,19 +188,10 @@ namespace cryptonote
return true;
}
//-----------------------------------------------------------------------------------------------------
- bool miner::is_mining() const
+ bool miner::is_mining()
{
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)
{
@@ -236,14 +226,12 @@ namespace cryptonote
return true;
}
//-----------------------------------------------------------------------------------------------------
- uint64_t miner::get_speed() const
+ uint64_t miner::get_speed()
{
- if(is_mining()) {
+ if(is_mining())
return m_current_hash_rate;
- }
- else {
+ else
return 0;
- }
}
//-----------------------------------------------------------------------------------------------------
void miner::send_stop_signal()
@@ -321,7 +309,6 @@ namespace cryptonote
difficulty_type local_diff = 0;
uint32_t local_template_ver = 0;
block b;
- slow_hash_allocate_state();
while(!m_stop)
{
if(m_pausers_count)//anti split workaround
@@ -370,7 +357,6 @@ namespace cryptonote
nonce+=m_threads_total;
++m_hashes;
}
- slow_hash_free_state();
LOG_PRINT_L0("Miner thread stopped ["<< th_local_index << "]");
return true;
}