Monero
  • 介绍
  • 区块链
    • checkpoints
    • account
    • cryptonote_basic
    • cryptonote_basic_impl
    • cryptonote_stat_info
    • difficulty
    • hardfork
    • miner
    • subaddress_index
    • tx_extra
    • verification_context
    • blockchain
    • cryptonote_core
    • cryptonote_format_utils
    • cryptonote_core
    • cryptonote_tx_utils
    • tx_pool
  • API/客户端
    • command_server
    • electrum-words
    • core_rpc_server
    • simplewallet
    • wallet_rpc_server
    • wallet2
    • wallet2_api
  • 网络传输
    • connection_context
    • block_queue
    • cryptonote_protocol_defs
    • cryptonote_protocol_handler
    • net_node
    • net_peerlist
    • p2p_protocol_defs
  • 数据存储
    • blockchain_db
    • berkeleydb
    • lmdb
    • blockchain_import
    • blockchain_export
  • 数学/密码学
    • aesb
    • blake256
    • chacha
    • groestl
    • jh
    • keccak
    • random
    • skein
    • slow-hash
    • tree-hash
    • gen_multisig
    • multisig
    • bulletproofs
    • rctOps
    • rctSigs
Powered by GitBook
On this page

Was this helpful?

  1. 区块链

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

PrevioushardforkNextsubaddress_index

Last updated 5 years ago

Was this helpful?