Bitcoin Core  0.20.99
P2P Digital Currency
Classes | Functions
mining.cpp File Reference
#include <amount.h>
#include <chain.h>
#include <chainparams.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 <net.h>
#include <node/context.h>
#include <policy/fees.h>
#include <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 <script/signingprovider.h>
#include <shutdown.h>
#include <txmempool.h>
#include <univalue.h>
#include <util/fees.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/system.h>
#include <util/translation.h>
#include <validation.h>
#include <validationinterface.h>
#include <versionbitsinfo.h>
#include <warnings.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)
 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 JSONRPCRequest &request)
 
static bool GenerateBlock (ChainstateManager &chainman, CBlock &block, uint64_t &max_tries, unsigned int &extra_nonce, uint256 &block_hash)
 
static UniValue generateBlocks (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 JSONRPCRequest &request)
 
static UniValue generatetoaddress (const JSONRPCRequest &request)
 
static UniValue generateblock (const JSONRPCRequest &request)
 
static UniValue getmininginfo (const JSONRPCRequest &request)
 
static UniValue prioritisetransaction (const JSONRPCRequest &request)
 
static UniValue BIP22ValidationResult (const BlockValidationState &state)
 
static std::string gbt_vb_name (const Consensus::DeploymentPos pos)
 
static UniValue getblocktemplate (const JSONRPCRequest &request)
 
static UniValue submitblock (const JSONRPCRequest &request)
 
static UniValue submitheader (const JSONRPCRequest &request)
 
static UniValue estimatesmartfee (const JSONRPCRequest &request)
 
static UniValue estimaterawfee (const JSONRPCRequest &request)
 
void RegisterMiningRPCCommands (CRPCTable &t)
 Register mining RPC commands. More...
 

Function Documentation

◆ BIP22ValidationResult()

static UniValue BIP22ValidationResult ( const BlockValidationState state)
static

Definition at line 460 of file mining.cpp.

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

◆ estimaterawfee()

static UniValue estimaterawfee ( const JSONRPCRequest request)
static

Definition at line 1064 of file mining.cpp.

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

◆ estimatesmartfee()

static UniValue estimatesmartfee ( const JSONRPCRequest request)
static

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

Here is the caller graph for this function:

◆ GenerateBlock()

static bool GenerateBlock ( ChainstateManager chainman,
CBlock block,
uint64_t &  max_tries,
unsigned int &  extra_nonce,
uint256 block_hash 
)
static

Definition at line 106 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 JSONRPCRequest request)
static

Definition at line 277 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,
const CTxMemPool mempool,
const CScript coinbase_script,
int  nGenerate,
uint64_t  nMaxTries 
)
static

Definition at line 137 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 JSONRPCRequest request)
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:

◆ generatetodescriptor()

static UniValue generatetodescriptor ( const JSONRPCRequest request)
static

Definition at line 203 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 JSONRPCRequest request)
static

Definition at line 487 of file mining.cpp.

Here is the caller graph for this function:

◆ getmininginfo()

static UniValue getmininginfo ( const JSONRPCRequest request)
static

Definition at line 384 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 47 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 JSONRPCRequest request)
static

Definition at line 84 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 169 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 JSONRPCRequest request)
static

Definition at line 424 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 1180 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 JSONRPCRequest request)
static

Definition at line 900 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 JSONRPCRequest request)
static

Definition at line 963 of file mining.cpp.

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