![]() |
Master Core
v0.0.9 - 49a5c0d97abf09ef2911ddfe8d9551df59f9efd3-dirty
|
Go to the source code of this file.
Data Structures | |
class | COrphan |
class | TxPriorityCompare |
Typedefs | |
typedef boost::tuple< double, double, const CTransaction * > | TxPriority |
Functions | |
static int | FormatHashBlocks (void *pbuffer, unsigned int len) |
void | SHA256Transform (void *pstate, void *pinput, const void *pinit) |
Base sha256 mining transform. More... | |
CBlockTemplate * | CreateNewBlock (const CScript &scriptPubKeyIn) |
Generate a new block, without valid proof-of-work. More... | |
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... | |
Variables | |
static const unsigned int | pSHA256InitState [8] |
uint64_t | nLastBlockTx = 0 |
uint64_t | nLastBlockSize = 0 |
typedef boost::tuple<double, double, const CTransaction*> TxPriority |
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().
Definition at line 19 of file miner.cpp.
Referenced by FormatHashBuffers().
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().
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.
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().
uint64_t nLastBlockSize = 0 |
Definition at line 81 of file miner.cpp.
Referenced by CreateNewBlock(), and getmininginfo().
uint64_t nLastBlockTx = 0 |
Definition at line 80 of file miner.cpp.
Referenced by CreateNewBlock(), and getmininginfo().
|
static |
Definition at line 34 of file miner.cpp.
Referenced by FormatHashBuffers().