Bitcoin Core  24.99.0
P2P Digital Currency
Namespaces | Functions
mining.h File Reference
#include <node/miner.h>
#include <memory>
#include <string>
#include <vector>
Include dependency graph for mining.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 node
 

Functions

std::vector< std::shared_ptr< CBlock > > CreateBlockChain (size_t total_height, const CChainParams &params)
 Create a blockchain, starting from genesis. More...
 
CTxIn MineBlock (const node::NodeContext &, const CScript &coinbase_scriptPubKey)
 Returns the generated coin. More...
 
std::shared_ptr< CBlockPrepareBlock (const node::NodeContext &, const CScript &coinbase_scriptPubKey)
 Prepare a block to be mined. More...
 
std::shared_ptr< CBlockPrepareBlock (const node::NodeContext &node, const CScript &coinbase_scriptPubKey, const node::BlockAssembler::Options &assembler_options)
 
CTxIn generatetoaddress (const node::NodeContext &, const std::string &address)
 RPC-like helper function, returns the generated coin. More...
 

Function Documentation

◆ CreateBlockChain()

std::vector<std::shared_ptr<CBlock> > CreateBlockChain ( size_t  total_height,
const CChainParams params 
)

Create a blockchain, starting from genesis.

Definition at line 30 of file mining.cpp.

Here is the call graph for this function:

◆ generatetoaddress()

CTxIn generatetoaddress ( const node::NodeContext node,
const std::string &  address 
)

RPC-like helper function, returns the generated coin.

Definition at line 21 of file mining.cpp.

Here is the call graph for this function:

◆ MineBlock()

CTxIn MineBlock ( const node::NodeContext node,
const CScript coinbase_scriptPubKey 
)

Returns the generated coin.

Definition at line 61 of file mining.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrepareBlock() [1/2]

std::shared_ptr<CBlock> PrepareBlock ( const node::NodeContext node,
const CScript coinbase_scriptPubKey 
)

Prepare a block to be mined.

Definition at line 90 of file mining.cpp.

Here is the call graph for this function:

◆ PrepareBlock() [2/2]

std::shared_ptr<CBlock> PrepareBlock ( const node::NodeContext node,
const CScript coinbase_scriptPubKey,
const node::BlockAssembler::Options assembler_options 
)