Bitcoin Core  0.19.99
P2P Digital Currency
Classes | Functions | Variables
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/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/system.h>
#include <util/validation.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 UniValue generateBlocks (const CTxMemPool &mempool, const CScript &coinbase_script, int nGenerate, uint64_t nMaxTries)
 
static UniValue generatetodescriptor (const JSONRPCRequest &request)
 
static UniValue generatetoaddress (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...
 

Variables

static const CRPCCommand commands []
 

Function Documentation

◆ BIP22ValidationResult()

static UniValue BIP22ValidationResult ( const BlockValidationState state)
static

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

Here is the call graph for this function:

◆ estimatesmartfee()

static UniValue estimatesmartfee ( const JSONRPCRequest request)
static

Definition at line 831 of file mining.cpp.

Here is the call graph for this function:

◆ gbt_vb_name()

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

Definition at line 322 of file mining.cpp.

Here is the caller graph for this function:

◆ generateBlocks()

static UniValue generateBlocks ( const CTxMemPool mempool,
const CScript coinbase_script,
int  nGenerate,
uint64_t  nMaxTries 
)
static

Definition at line 105 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 189 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 146 of file mining.cpp.

Here is the call graph for this function:

◆ getblocktemplate()

static UniValue getblocktemplate ( const JSONRPCRequest request)
static

Definition at line 331 of file mining.cpp.

◆ getmininginfo()

static UniValue getmininginfo ( const JSONRPCRequest request)
static

Definition at line 227 of file mining.cpp.

Here is the call 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 45 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 82 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 267 of file mining.cpp.

Here is the call graph for this function:

◆ RegisterMiningRPCCommands()

void RegisterMiningRPCCommands ( CRPCTable t)

Register mining RPC commands.

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

Here is the call graph for this function:

◆ submitheader()

static UniValue submitheader ( const JSONRPCRequest request)
static

Definition at line 794 of file mining.cpp.

Here is the call graph for this function:

Variable Documentation

◆ commands

const CRPCCommand commands[]
static
Initial value:
=
{
{ "mining", "getnetworkhashps", &getnetworkhashps, {"nblocks","height"} },
{ "mining", "getmininginfo", &getmininginfo, {} },
{ "mining", "prioritisetransaction", &prioritisetransaction, {"txid","dummy","fee_delta"} },
{ "mining", "getblocktemplate", &getblocktemplate, {"template_request"} },
{ "mining", "submitblock", &submitblock, {"hexdata","dummy"} },
{ "mining", "submitheader", &submitheader, {"hexdata"} },
{ "generating", "generatetoaddress", &generatetoaddress, {"nblocks","address","maxtries"} },
{ "generating", "generatetodescriptor", &generatetodescriptor, {"num_blocks","descriptor","maxtries"} },
{ "util", "estimatesmartfee", &estimatesmartfee, {"conf_target", "estimate_mode"} },
{ "hidden", "estimaterawfee", &estimaterawfee, {"conf_target", "threshold"} },
}
static UniValue generatetodescriptor(const JSONRPCRequest &request)
Definition: mining.cpp:146
static UniValue getnetworkhashps(const JSONRPCRequest &request)
Definition: mining.cpp:82
static UniValue submitblock(const JSONRPCRequest &request)
Definition: mining.cpp:731
static UniValue generatetoaddress(const JSONRPCRequest &request)
Definition: mining.cpp:189
static UniValue prioritisetransaction(const JSONRPCRequest &request)
Definition: mining.cpp:267
static UniValue estimatesmartfee(const JSONRPCRequest &request)
Definition: mining.cpp:831
static UniValue getmininginfo(const JSONRPCRequest &request)
Definition: mining.cpp:227
static UniValue getblocktemplate(const JSONRPCRequest &request)
Definition: mining.cpp:331
static UniValue submitheader(const JSONRPCRequest &request)
Definition: mining.cpp:794
static UniValue estimaterawfee(const JSONRPCRequest &request)
Definition: mining.cpp:894

Definition at line 1007 of file mining.cpp.