aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/miner.cpp
diff options
context:
space:
mode:
authormonero-project <sempre.amaro@gmail.com>2014-06-19 20:23:37 -0400
committermonero-project <sempre.amaro@gmail.com>2014-06-19 20:23:37 -0400
commit05a5c62fe8a26f8f15427b1d6f5a4634cbab9597 (patch)
treefccbd9a667661fc0e499e7d283c526032c9a2772 /src/cryptonote_core/miner.cpp
parentMerge pull request #33 from mikezackles/arch_linux_build_fixes (diff)
parentUpdate slow-hash.c (diff)
downloadmonero-05a5c62fe8a26f8f15427b1d6f5a4634cbab9597.tar.xz
Merge pull request #48 from NoodleDoodleNoodleDoodleNoodleDoodleNoo/master
Update slow-hash.c with optimized scratchpad operations
Diffstat (limited to 'src/cryptonote_core/miner.cpp')
-rw-r--r--src/cryptonote_core/miner.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp
index 2055bb15d..d021b05bd 100644
--- a/src/cryptonote_core/miner.cpp
+++ b/src/cryptonote_core/miner.cpp
@@ -23,7 +23,8 @@ using namespace epee;
#include "miner.h"
-
+extern "C" void slow_hash_allocate_state();
+extern "C" void slow_hash_free_state();
namespace cryptonote
{
@@ -320,6 +321,7 @@ 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
@@ -368,6 +370,7 @@ namespace cryptonote
nonce+=m_threads_total;
++m_hashes;
}
+ slow_hash_free_state();
LOG_PRINT_L0("Miner thread stopped ["<< th_local_index << "]");
return true;
}