diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-03-17 17:55:32 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-03-17 17:55:32 +0200 |
commit | 429930534df43b8bef46a4a39dbfbc3d3b5939b0 (patch) | |
tree | 0280220db27a66d12d16e3b42a003cebab00177a /src/cryptonote_basic/miner.h | |
parent | Merge pull request #5182 (diff) | |
parent | daemon: new mining_status command (diff) | |
download | monero-429930534df43b8bef46a4a39dbfbc3d3b5939b0.tar.xz |
Merge pull request #5185
59478c80 daemon: new mining_status command (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_basic/miner.h')
-rw-r--r-- | src/cryptonote_basic/miner.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cryptonote_basic/miner.h b/src/cryptonote_basic/miner.h index e608d7083..08b1bd7f1 100644 --- a/src/cryptonote_basic/miner.h +++ b/src/cryptonote_basic/miner.h @@ -61,7 +61,7 @@ namespace cryptonote ~miner(); bool init(const boost::program_options::variables_map& vm, network_type nettype); 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 set_block_template(const block& bl, const difficulty_type& diffic, uint64_t height, uint64_t block_reward); bool on_block_chain_update(); bool start(const account_public_address& adr, size_t threads_count, const boost::thread::attributes& attrs, bool do_background = false, bool ignore_battery = false); uint64_t get_speed() const; @@ -85,6 +85,7 @@ namespace cryptonote bool set_idle_threshold(uint8_t idle_threshold); uint8_t get_mining_target() const; bool set_mining_target(uint8_t mining_target); + uint64_t get_block_reward() const { return m_block_reward; } static constexpr uint8_t BACKGROUND_MINING_DEFAULT_IDLE_THRESHOLD_PERCENTAGE = 90; static constexpr uint8_t BACKGROUND_MINING_MIN_IDLE_THRESHOLD_PERCENTAGE = 50; @@ -169,5 +170,6 @@ namespace cryptonote static bool get_process_time(uint64_t& total_time); static uint8_t get_percent_of_total(uint64_t some_time, uint64_t total_time); static boost::logic::tribool on_battery_power(); + std::atomic<uint64_t> m_block_reward; }; } |