miner

    volatile uint32_t m_stop;
    epee::critical_section m_template_lock;
    block m_template;
    std::atomic<uint32_t> m_template_no;
    std::atomic<uint32_t> m_starter_nonce;
    difficulty_type m_diffic;
    uint64_t m_height;
    volatile uint32_t m_thread_index; 
    volatile uint32_t m_threads_total;
    std::atomic<int32_t> m_pausers_count;
    epee::critical_section m_miners_count_lock;

    std::list<boost::thread> m_threads;
    epee::critical_section m_threads_lock;
    i_miner_handler* m_phandler;
    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;
    std::vector<blobdata> m_extra_messages;
    miner_config m_config;
    std::string m_config_folder_path;    
    std::atomic<uint64_t> m_last_hr_merge_time;
    std::atomic<uint64_t> m_hashes;
    std::atomic<uint64_t> m_current_hash_rate;
    epee::critical_section m_last_hash_rates_lock;
    std::list<uint64_t> m_last_hash_rates;
    bool m_do_print_hashrate;
    bool m_do_mining;

    // background mining stuffs ..

    bool set_is_background_mining_enabled(bool is_background_mining_enabled);
    void set_ignore_battery(bool ignore_battery);
    bool background_worker_thread();
    std::atomic<bool> m_is_background_mining_enabled;
    bool m_ignore_battery;
    boost::mutex m_is_background_mining_enabled_mutex;
    boost::condition_variable m_is_background_mining_enabled_cond;
    std::atomic<bool> m_is_background_mining_started;
    boost::mutex m_is_background_mining_started_mutex;
    boost::condition_variable m_is_background_mining_started_cond;    
    boost::thread m_background_mining_thread;
    uint64_t m_min_idle_seconds;
    uint8_t m_idle_threshold;
    uint8_t m_mining_target;
    std::atomic<uint64_t> m_miner_extra_sleep;

set_block_template

on_block_chain_update

request_block_template

on_idle

do_print_hashrate

merge_hr

init_options

init

is_mining

get_mining_address

get_threads_count

start

get_speed

send_stop_signal

stop

find_nonce_for_given_block

on_synchronized

pause

resume

worker_thread

get_is_background_mining_enabled

get_ignore_battery

set_is_background_mining_enabled

set_ignore_battery

get_min_idle_seconds

set_min_idle_seconds

get_idle_threshold

set_idle_threshold

get_mining_target

set_mining_target

background_worker_thread

get_system_times

get_process_time

get_percent_of_total

on_battery_power

Last updated

Was this helpful?