Bitcoin Core 31.99.0
P2P Digital Currency
Namespaces | Functions
miner.cpp File Reference
#include <node/miner.h>
#include <chain.h>
#include <chainparams.h>
#include <common/args.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/merkle.h>
#include <consensus/params.h>
#include <consensus/tx_verify.h>
#include <consensus/validation.h>
#include <interfaces/types.h>
#include <node/blockstorage.h>
#include <node/kernel_notifications.h>
#include <node/mining_args.h>
#include <node/mining_types.h>
#include <policy/feerate.h>
#include <policy/policy.h>
#include <pow.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <sync.h>
#include <tinyformat.h>
#include <txgraph.h>
#include <txmempool.h>
#include <uint256.h>
#include <util/check.h>
#include <util/feefrac.h>
#include <util/log.h>
#include <util/result.h>
#include <util/signalinterrupt.h>
#include <util/time.h>
#include <util/translation.h>
#include <validation.h>
#include <validationinterface.h>
#include <versionbits.h>
#include <algorithm>
#include <compare>
#include <condition_variable>
#include <cstddef>
#include <functional>
#include <numeric>
#include <span>
#include <stdexcept>
#include <string>
#include <utility>
Include dependency graph for miner.cpp:

Go to the source code of this file.

Namespaces

namespace  node
 

Functions

int64_t node::GetMinimumTime (const CBlockIndex *pindexPrev, int64_t difficulty_adjustment_interval)
 Get the minimum time a miner should use in the next block. More...
 
int64_t node::UpdateTime (CBlockHeader *pblock, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
 
void node::RegenerateCommitments (CBlock &block, ChainstateManager &chainman)
 Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed. More...
 
void node::AddMerkleRootAndCoinbase (CBlock &block, CTransactionRef coinbase, uint32_t version, uint32_t timestamp, uint32_t nonce)
 
bool node::SubmitBlock (ChainstateManager &chainman, const std::shared_ptr< const CBlock > &block, bool *new_block, std::string &reason, std::string &debug)
 Submit a block and capture the validation state via the BlockChecked callback. More...
 
void node::InterruptWait (KernelNotifications &kernel_notifications, bool &interrupt_wait)
 
std::unique_ptr< CBlockTemplate > node::WaitAndCreateNewBlock (ChainstateManager &chainman, KernelNotifications &kernel_notifications, CTxMemPool *mempool, const std::unique_ptr< CBlockTemplate > &block_template, const BlockWaitOptions &wait_options, const BlockCreateOptions &create_options, bool &interrupt_wait)
 Return a new block template when fees rise to a certain threshold or after a new tip; return nullopt if timeout is reached. More...
 
std::optional< BlockRefnode::GetTip (ChainstateManager &chainman)
 
bool node::CooldownIfHeadersAhead (ChainstateManager &chainman, KernelNotifications &kernel_notifications, const BlockRef &last_tip, bool &interrupt_mining)
 Wait while the best known header extends the current chain tip AND at least one block is being added to the tip every 3 seconds. More...
 
std::optional< BlockRefnode::WaitTipChanged (ChainstateManager &chainman, KernelNotifications &kernel_notifications, const uint256 &current_tip, MillisecondsDouble &timeout, bool &interrupt)
 

Variable Documentation

◆ m_found

bool m_found {false}

Definition at line 366 of file miner.cpp.

◆ m_hash

uint256 m_hash

Definition at line 365 of file miner.cpp.

◆ m_state

Definition at line 367 of file miner.cpp.