aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/miner.h
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2019-04-23 20:32:27 +0100
committerHoward Chu <hyc@symas.com>2019-09-25 21:29:42 +0100
commit81c2ad6d5b17cf280a4a55fd6159e8dde423f5a8 (patch)
tree7bb731b721183e73afbb60e01cf3759723e4948b /src/cryptonote_basic/miner.h
parentMerge pull request #5909 (diff)
downloadmonero-81c2ad6d5b17cf280a4a55fd6159e8dde423f5a8.tar.xz
RandomX integration
Support RandomX PoW algorithm
Diffstat (limited to 'src/cryptonote_basic/miner.h')
-rw-r--r--src/cryptonote_basic/miner.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cryptonote_basic/miner.h b/src/cryptonote_basic/miner.h
index ac7a0381c..4efbcbec3 100644
--- a/src/cryptonote_basic/miner.h
+++ b/src/cryptonote_basic/miner.h
@@ -52,13 +52,15 @@ namespace cryptonote
~i_miner_handler(){};
};
+ class Blockchain;
+
/************************************************************************/
/* */
/************************************************************************/
class miner
{
public:
- miner(i_miner_handler* phandler);
+ miner(i_miner_handler* phandler, Blockchain* pbc);
~miner();
bool init(const boost::program_options::variables_map& vm, network_type nettype);
static void init_options(boost::program_options::options_description& desc);
@@ -74,7 +76,7 @@ namespace cryptonote
bool on_idle();
void on_synchronized();
//synchronous analog (for fast calls)
- static bool find_nonce_for_given_block(block& bl, const difficulty_type& diffic, uint64_t height);
+ static bool find_nonce_for_given_block(const Blockchain *pbc, block& bl, const difficulty_type& diffic, uint64_t height);
void pause();
void resume();
void do_print_hashrate(bool do_hr);
@@ -133,6 +135,7 @@ namespace cryptonote
std::list<boost::thread> m_threads;
epee::critical_section m_threads_lock;
i_miner_handler* m_phandler;
+ Blockchain* m_pbc;
account_public_address m_mine_address;
epee::math_helper::once_a_time_seconds<5> m_update_block_template_interval;
epee::math_helper::once_a_time_seconds<2> m_update_merge_hr_interval;