Bitcoin ABC  0.24.7
P2P Digital Currency
Classes | Functions
mining.cpp File Reference
#include <amount.h>
#include <blockvalidity.h>
#include <cashaddrenc.h>
#include <chain.h>
#include <chainparams.h>
#include <config.h>
#include <consensus/activation.h>
#include <consensus/consensus.h>
#include <consensus/params.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <key_io.h>
#include <miner.h>
#include <minerfund.h>
#include <net.h>
#include <node/context.h>
#include <policy/policy.h>
#include <pow/pow.h>
#include <rpc/blockchain.h>
#include <rpc/mining.h>
#include <rpc/server.h>
#include <rpc/util.h>
#include <script/descriptor.h>
#include <script/script.h>
#include <shutdown.h>
#include <txmempool.h>
#include <univalue.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/system.h>
#include <util/translation.h>
#include <validation.h>
#include <validationinterface.h>
#include <warnings.h>
#include <cstdint>
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)
 Return average network hashes per second based on the last 'lookup' blocks, or from the last difficulty change if 'lookup' is nonpositive. More...
 
static RPCHelpMan getnetworkhashps ()
 
static bool GenerateBlock (const Config &config, ChainstateManager &chainman, CBlock &block, uint64_t &max_tries, unsigned int &extra_nonce, BlockHash &block_hash)
 
static UniValue generateBlocks (const Config &config, ChainstateManager &chainman, const CTxMemPool &mempool, const CScript &coinbase_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 UniValue BIP22ValidationResult (const Config &config, const BlockValidationState &state)
 
static RPCHelpMan getblocktemplate ()
 
static RPCHelpMan submitblock ()
 
static RPCHelpMan submitheader ()
 
static RPCHelpMan estimatefee ()
 
void RegisterMiningRPCCommands (CRPCTable &t)
 Register mining RPC commands. More...
 

Function Documentation

◆ BIP22ValidationResult()

static UniValue BIP22ValidationResult ( const Config config,
const BlockValidationState state 
)
static

Definition at line 595 of file mining.cpp.

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

◆ estimatefee()

static RPCHelpMan estimatefee ( )
static

Definition at line 1177 of file mining.cpp.

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

◆ generate()

static RPCHelpMan generate ( )
static

Definition at line 284 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 353 of file mining.cpp.

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

◆ GenerateBlock()

static bool GenerateBlock ( const Config config,
ChainstateManager chainman,
CBlock block,
uint64_t &  max_tries,
unsigned int &  extra_nonce,
BlockHash block_hash 
)
static

Definition at line 122 of file mining.cpp.

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

◆ generateBlocks()

static UniValue generateBlocks ( const Config config,
ChainstateManager chainman,
const CTxMemPool mempool,
const CScript coinbase_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 302 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 239 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 617 of file mining.cpp.

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

◆ getmininginfo()

static RPCHelpMan getmininginfo ( )
static

Definition at line 491 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 93 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 
)
static

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

If 'height' is nonnegative, compute the estimate at the time when a given block was found.

Definition at line 48 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 202 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 549 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)

Register mining RPC commands.

Definition at line 1193 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 1065 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 1133 of file mining.cpp.

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