Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Functions
mining.cpp File Reference
#include <bitcoin-build-config.h>
#include <chain.h>
#include <chainparams.h>
#include <chainparamsbase.h>
#include <common/system.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/merkle.h>
#include <consensus/params.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <deploymentinfo.h>
#include <deploymentstatus.h>
#include <interfaces/mining.h>
#include <key_io.h>
#include <net.h>
#include <node/context.h>
#include <node/miner.h>
#include <node/warnings.h>
#include <policy/ephemeral_policy.h>
#include <pow.h>
#include <rpc/blockchain.h>
#include <rpc/mining.h>
#include <rpc/server.h>
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <script/descriptor.h>
#include <script/script.h>
#include <script/signingprovider.h>
#include <txmempool.h>
#include <univalue.h>
#include <util/signalinterrupt.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/time.h>
#include <util/translation.h>
#include <validation.h>
#include <validationinterface.h>
#include <memory>
#include <stdint.h>
Include dependency graph for mining.cpp:

Go to the source code of this file.

Classes

class  submitblock_StateCatcher
 

Functions

static UniValue GetNetworkHashPS (int lookup, int height, const CChain &active_chain)
 Return average network hashes per second based on the last 'lookup' blocks, or from the last difficulty change if 'lookup' is -1. More...
 
static RPCHelpMan getnetworkhashps ()
 
static bool GenerateBlock (ChainstateManager &chainman, CBlock &&block, uint64_t &max_tries, std::shared_ptr< const CBlock > &block_out, bool process_new_block)
 
static UniValue generateBlocks (ChainstateManager &chainman, Mining &miner, const CScript &coinbase_output_script, int nGenerate, uint64_t nMaxTries)
 
static bool getScriptFromDescriptor (const std::string &descriptor, CScript &script, std::string &error)
 
static RPCHelpMan generatetodescriptor ()
 
static RPCHelpMan generate ()
 
static RPCHelpMan generatetoaddress ()
 
static RPCHelpMan generateblock ()
 
static RPCHelpMan getmininginfo ()
 
static RPCHelpMan prioritisetransaction ()
 
static RPCHelpMan getprioritisedtransactions ()
 
static UniValue BIP22ValidationResult (const BlockValidationState &state)
 
static std::string gbt_vb_name (const Consensus::DeploymentPos pos)
 
static RPCHelpMan getblocktemplate ()
 
static RPCHelpMan submitblock ()
 
static RPCHelpMan submitheader ()
 
void RegisterMiningRPCCommands (CRPCTable &t)
 

Function Documentation

◆ BIP22ValidationResult()

static UniValue BIP22ValidationResult ( const BlockValidationState state)
static

Definition at line 550 of file mining.cpp.

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

◆ gbt_vb_name()

static std::string gbt_vb_name ( const Consensus::DeploymentPos  pos)
static

Definition at line 568 of file mining.cpp.

Here is the caller graph for this function:

◆ generate()

static RPCHelpMan generate ( )
static

Definition at line 254 of file mining.cpp.

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

◆ generateblock()

static RPCHelpMan generateblock ( )
static

Definition at line 302 of file mining.cpp.

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

◆ GenerateBlock()

static bool GenerateBlock ( ChainstateManager chainman,
CBlock &&  block,
uint64_t &  max_tries,
std::shared_ptr< const CBlock > &  block_out,
bool  process_new_block 
)
static

Definition at line 134 of file mining.cpp.

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

◆ generateBlocks()

static UniValue generateBlocks ( ChainstateManager chainman,
Mining miner,
const CScript coinbase_output_script,
int  nGenerate,
uint64_t  nMaxTries 
)
static

Definition at line 161 of file mining.cpp.

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

◆ generatetoaddress()

static RPCHelpMan generatetoaddress ( )
static

Definition at line 261 of file mining.cpp.

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

◆ generatetodescriptor()

static RPCHelpMan generatetodescriptor ( )
static

Definition at line 216 of file mining.cpp.

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

◆ getblocktemplate()

static RPCHelpMan getblocktemplate ( )
static

Definition at line 577 of file mining.cpp.

Here is the caller graph for this function:

◆ getmininginfo()

static RPCHelpMan getmininginfo ( )
static

Definition at line 413 of file mining.cpp.

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

◆ getnetworkhashps()

static RPCHelpMan getnetworkhashps ( )
static

Definition at line 109 of file mining.cpp.

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

◆ GetNetworkHashPS()

static UniValue GetNetworkHashPS ( int  lookup,
int  height,
const CChain active_chain 
)
static

Return average network hashes per second based on the last 'lookup' blocks, or from the last difficulty change if 'lookup' is -1.

If 'height' is -1, compute the estimate from current chain tip. If 'height' is a valid block height, compute the estimate at the time when a given block was found.

Definition at line 63 of file mining.cpp.

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

◆ getprioritisedtransactions()

static RPCHelpMan getprioritisedtransactions ( )
static

Definition at line 510 of file mining.cpp.

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

◆ getScriptFromDescriptor()

static bool getScriptFromDescriptor ( const std::string &  descriptor,
CScript script,
std::string &  error 
)
static

Definition at line 181 of file mining.cpp.

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

◆ prioritisetransaction()

static RPCHelpMan prioritisetransaction ( )
static

Definition at line 465 of file mining.cpp.

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

◆ RegisterMiningRPCCommands()

void RegisterMiningRPCCommands ( CRPCTable t)

Definition at line 1092 of file mining.cpp.

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

◆ submitblock()

static RPCHelpMan submitblock ( )
static

Definition at line 1002 of file mining.cpp.

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

◆ submitheader()

static RPCHelpMan submitheader ( )
static

Definition at line 1053 of file mining.cpp.

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