aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/cryptonote_format_utils.h2
-rw-r--r--src/cryptonote_core/miner.cpp11
-rw-r--r--src/cryptonote_core/miner.h2
3 files changed, 10 insertions, 5 deletions
diff --git a/src/cryptonote_core/cryptonote_format_utils.h b/src/cryptonote_core/cryptonote_format_utils.h
index 554e466cc..5873d2943 100644
--- a/src/cryptonote_core/cryptonote_format_utils.h
+++ b/src/cryptonote_core/cryptonote_format_utils.h
@@ -25,7 +25,7 @@ namespace cryptonote
typedef std::pair<uint64_t, crypto::public_key> output_entry;
std::vector<output_entry> outputs; //index + key
- uint64_t real_output; //index in outputs vector of real output_entry
+ size_t real_output; //index in outputs vector of real output_entry
crypto::public_key real_out_tx_key; //incoming real tx public key
size_t real_output_in_tx_index; //index in transaction outputs vector
uint64_t amount; //money
diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp
index 142c81f68..56b459d6e 100644
--- a/src/cryptonote_core/miner.cpp
+++ b/src/cryptonote_core/miner.cpp
@@ -193,7 +193,7 @@ namespace cryptonote
return !m_stop;
}
//-----------------------------------------------------------------------------------------------------
- bool miner::start(const account_public_address& adr, size_t threads_count)
+ bool miner::start(const account_public_address& adr, size_t threads_count, const boost::thread::attributes& attrs)
{
m_mine_address = adr;
m_threads_total = static_cast<uint32_t>(threads_count);
@@ -218,7 +218,9 @@ namespace cryptonote
boost::interprocess::ipcdetail::atomic_write32(&m_thread_index, 0);
for(size_t i = 0; i != threads_count; i++)
- m_threads.push_back(boost::thread(boost::bind(&miner::worker_thread, this)));
+ {
+ m_threads.push_back(boost::thread(attrs, boost::bind(&miner::worker_thread, this)));
+ }
LOG_PRINT_L0("Mining has started with " << threads_count << " threads, good luck!" )
return true;
@@ -269,7 +271,10 @@ namespace cryptonote
{
if(m_do_mining)
{
- start(m_mine_address, m_threads_total);
+ boost::thread::attributes attrs;
+ attrs.set_stack_size(THREAD_STACK_SIZE);
+
+ start(m_mine_address, m_threads_total, attrs);
}
}
//-----------------------------------------------------------------------------------------------------
diff --git a/src/cryptonote_core/miner.h b/src/cryptonote_core/miner.h
index 03f09509e..da4578b06 100644
--- a/src/cryptonote_core/miner.h
+++ b/src/cryptonote_core/miner.h
@@ -35,7 +35,7 @@ namespace cryptonote
static void init_options(boost::program_options::options_description& desc);
bool set_block_template(const block& bl, const difficulty_type& diffic, uint64_t height);
bool on_block_chain_update();
- bool start(const account_public_address& adr, size_t threads_count);
+ bool start(const account_public_address& adr, size_t threads_count, const boost::thread::attributes& attrs);
uint64_t get_speed();
void send_stop_signal();
bool stop();