Dash Core  0.12.2.1
P2P Digital Currency
miner.h File Reference
#include "primitives/block.h"
#include <stdint.h>

Go to the source code of this file.

Classes

struct  CBlockTemplate
 

Namespaces

 Consensus
 

Functions

void GenerateBitcoins (bool fGenerate, int nThreads, const CChainParams &chainparams, CConnman &connman)
 
CBlockTemplateCreateNewBlock (const CChainParams &chainparams, const CScript &scriptPubKeyIn)
 
void IncrementExtraNonce (CBlock *pblock, const CBlockIndex *pindexPrev, unsigned int &nExtraNonce)
 
int64_t UpdateTime (CBlockHeader *pblock, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
 

Variables

static const bool DEFAULT_GENERATE = false
 
static const int DEFAULT_GENERATE_THREADS = 1
 
static const bool DEFAULT_PRINTPRIORITY = false
 

Function Documentation

◆ CreateNewBlock()

CBlockTemplate* CreateNewBlock ( const CChainParams chainparams,
const CScript scriptPubKeyIn 
)

Generate a new block, without valid proof-of-work

Definition at line 77 of file miner.cpp.

Referenced by BitcoinMiner(), generate(), and getblocktemplate().

◆ GenerateBitcoins()

void GenerateBitcoins ( bool  fGenerate,
int  nThreads,
const CChainParams chainparams,
CConnman connman 
)

Run the miner threads

Definition at line 524 of file miner.cpp.

Referenced by AppInit2(), PrepareShutdown(), and setgenerate().

◆ IncrementExtraNonce()

void IncrementExtraNonce ( CBlock pblock,
const CBlockIndex pindexPrev,
unsigned int &  nExtraNonce 
)

Modify the extranonce in a block

Definition at line 322 of file miner.cpp.

Referenced by BitcoinMiner(), and generate().

◆ UpdateTime()

int64_t UpdateTime ( CBlockHeader pblock,
const Consensus::Params consensusParams,
const CBlockIndex pindexPrev 
)

Definition at line 62 of file miner.cpp.

Referenced by BitcoinMiner(), CreateNewBlock(), and getblocktemplate().

Variable Documentation

◆ DEFAULT_GENERATE

const bool DEFAULT_GENERATE = false
static

Definition at line 21 of file miner.h.

Referenced by AppInit2(), getgenerate(), and HelpMessage().

◆ DEFAULT_GENERATE_THREADS

const int DEFAULT_GENERATE_THREADS = 1
static

Definition at line 22 of file miner.h.

Referenced by AppInit2(), getmininginfo(), HelpMessage(), and setgenerate().

◆ DEFAULT_PRINTPRIORITY

const bool DEFAULT_PRINTPRIORITY = false
static

Definition at line 24 of file miner.h.

Referenced by CreateNewBlock(), and HelpMessage().