Bitcoin ABC  0.22.12
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/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 <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 UniValue getnetworkhashps (const Config &config, const JSONRPCRequest &request)
 
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 UniValue generatetodescriptor (const Config &config, const JSONRPCRequest &request)
 
static UniValue generatetoaddress (const Config &config, const JSONRPCRequest &request)
 
static UniValue generateblock (const Config &config, const JSONRPCRequest &request)
 
static UniValue getmininginfo (const Config &config, const JSONRPCRequest &request)
 
static UniValue prioritisetransaction (const Config &config, const JSONRPCRequest &request)
 
static UniValue BIP22ValidationResult (const Config &config, const BlockValidationState &state)
 
static UniValue getblocktemplate (const Config &config, const JSONRPCRequest &request)
 
static UniValue submitblock (const Config &config, const JSONRPCRequest &request)
 
static UniValue submitheader (const Config &config, const JSONRPCRequest &request)
 
static UniValue estimatefee (const Config &config, const JSONRPCRequest &request)
 
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 567 of file mining.cpp.

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

◆ estimatefee()

static UniValue estimatefee ( const Config config,
const JSONRPCRequest request 
)
static

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

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

◆ generateblock()

static UniValue generateblock ( const Config config,
const JSONRPCRequest request 
)
static

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

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

◆ generatetoaddress()

static UniValue generatetoaddress ( const Config config,
const JSONRPCRequest request 
)
static

Definition at line 280 of file mining.cpp.

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

◆ generatetodescriptor()

static UniValue generatetodescriptor ( const Config config,
const JSONRPCRequest request 
)
static

Definition at line 237 of file mining.cpp.

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

◆ getblocktemplate()

static UniValue getblocktemplate ( const Config config,
const JSONRPCRequest request 
)
static

Definition at line 589 of file mining.cpp.

Here is the caller graph for this function:

◆ getmininginfo()

static UniValue getmininginfo ( const Config config,
const JSONRPCRequest request 
)
static

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

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

◆ getnetworkhashps()

static UniValue getnetworkhashps ( const Config config,
const JSONRPCRequest request 
)
static

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

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

◆ prioritisetransaction()

static UniValue prioritisetransaction ( const Config config,
const JSONRPCRequest request 
)
static

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

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

◆ submitblock()

static UniValue submitblock ( const Config config,
const JSONRPCRequest request 
)
static

Definition at line 1024 of file mining.cpp.

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

◆ submitheader()

static UniValue submitheader ( const Config config,
const JSONRPCRequest request 
)
static

Definition at line 1095 of file mining.cpp.

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