![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
#include <stdint.h>
Include dependency graph for miner.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | GenerateBitcoins (bool fGenerate, CWallet *pwallet, int nThreads) |
| Run the miner threads. More... | |
| CBlockTemplate * | CreateNewBlock (const CScript &scriptPubKeyIn) |
| Generate a new block, without valid proof-of-work. More... | |
| CBlockTemplate * | CreateNewBlockWithKey (CReserveKey &reservekey) |
| void | IncrementExtraNonce (CBlock *pblock, CBlockIndex *pindexPrev, unsigned int &nExtraNonce) |
| Modify the extranonce in a block. More... | |
| void | FormatHashBuffers (CBlock *pblock, char *pmidstate, char *pdata, char *phash1) |
| Do mining precalculation. More... | |
| bool | CheckWork (CBlock *pblock, CWallet &wallet, CReserveKey &reservekey) |
| Check mined block. More... | |
| void | SHA256Transform (void *pstate, void *pinput, const void *pinit) |
| Base sha256 mining transform. More... | |
Variables | |
| double | dHashesPerSec |
| int64_t | nHPSTimerStart |
| bool CheckWork | ( | CBlock * | pblock, |
| CWallet & | wallet, | ||
| CReserveKey & | reservekey | ||
| ) |
Check mined block.
| CBlockTemplate* CreateNewBlock | ( | const CScript & | scriptPubKeyIn | ) |
Generate a new block, without valid proof-of-work.
Definition at line 107 of file miner.cpp.
References AllowFree(), CBlockTemplate::block, chainActive, CheckInputs(), CTransaction::ComputePriority(), ConnectBlock(), CTxMemPool::cs, cs_main, DEFAULT_BLOCK_MAX_SIZE, DEFAULT_BLOCK_MIN_SIZE, DEFAULT_BLOCK_PRIORITY_SIZE, COrphan::dFeePerKb, COrphan::dPriority, fDebug, GetArg(), CBlockIndex::GetBlockHash(), GetBlockValue(), GetBoolArg(), CCoinsViewCache::GetCoins(), CTransaction::GetHash(), GetLegacySigOpCount(), GetNextWorkRequired(), GetP2SHSigOpCount(), GetSerializeSize(), CCoinsViewCache::GetValueIn(), CTransaction::GetValueOut(), COutPoint::hash, CBlockHeader::hashPrevBlock, CCoinsViewCache::HaveCoins(), CCoinsViewCache::HaveInputs(), CTransaction::IsCoinBase(), IsFinalTx(), LOCK2, LogPrintf, CTxMemPool::mapTx, MAX_BLOCK_SIGOPS, MAX_BLOCK_SIZE, mempool, COutPoint::n, CBlockHeader::nBits, CCoins::nHeight, CBlockIndex::nHeight, nLastBlockSize, nLastBlockTx, CTransaction::nMinRelayTxFee, CBlockHeader::nNonce, OP_0, pcoinsTip, CBlockIndex::pprev, CTxIn::prevout, PROTOCOL_VERSION, COrphan::ptx, SCRIPT_VERIFY_P2SH, SER_NETWORK, COrphan::setDependsOn, CChain::Tip(), base_uint< BITS >::ToString(), UpdateCoins(), UpdateTime(), CTransaction::vin, CCoins::vout, CTransaction::vout, CBlock::vtx, CBlockTemplate::vTxFees, and CBlockTemplate::vTxSigOps.
Referenced by getblocktemplate().
Here is the call graph for this function:
Here is the caller graph for this function:| CBlockTemplate* CreateNewBlockWithKey | ( | CReserveKey & | reservekey | ) |
| void FormatHashBuffers | ( | CBlock * | pblock, |
| char * | pmidstate, | ||
| char * | pdata, | ||
| char * | phash1 | ||
| ) |
Do mining precalculation.
Definition at line 365 of file miner.cpp.
References ByteReverse(), FormatHashBlocks(), CBlockHeader::hashMerkleRoot, CBlockHeader::hashPrevBlock, memcpy(), CBlockHeader::nBits, CBlockHeader::nNonce, CBlockHeader::nTime, CBlockHeader::nVersion, pSHA256InitState, and SHA256Transform().
Here is the call graph for this function:Run the miner threads.
Referenced by AppInit2(), and Shutdown().
Here is the caller graph for this function:| void IncrementExtraNonce | ( | CBlock * | pblock, |
| CBlockIndex * | pindexPrev, | ||
| unsigned int & | nExtraNonce | ||
| ) |
Modify the extranonce in a block.
Definition at line 347 of file miner.cpp.
References CBlock::BuildMerkleTree(), COINBASE_FLAGS, CBlockHeader::hashMerkleRoot, CBlockHeader::hashPrevBlock, CBlockIndex::nHeight, and CBlock::vtx.
Here is the call graph for this function:| void SHA256Transform | ( | void * | pstate, |
| void * | pinput, | ||
| const void * | pinit | ||
| ) |
Base sha256 mining transform.
Definition at line 37 of file miner.cpp.
References ByteReverse(), and Checkpoints::data.
Referenced by FormatHashBuffers().
Here is the call graph for this function:
Here is the caller graph for this function:| double dHashesPerSec |
| int64_t nHPSTimerStart |
1.8.8