Bitcoin ABC 0.30.7
P2P Digital Currency
|
Generate a new block, without valid proof-of-work. More...
#include <miner.h>
Classes | |
struct | Options |
Public Member Functions | |
BlockAssembler (const Config &config, Chainstate &chainstate, const CTxMemPool *mempool, const avalanche::Processor *avalanche=nullptr) | |
BlockAssembler (Chainstate &chainstate, const CTxMemPool *mempool, const Options &options, const avalanche::Processor *avalanche=nullptr) | |
std::unique_ptr< CBlockTemplate > | CreateNewBlock (const CScript &scriptPubKeyIn) |
Construct a new block template with coinbase to scriptPubKeyIn. More... | |
uint64_t | GetMaxGeneratedBlockSize () const |
Static Public Attributes | |
static std::optional< int64_t > | m_last_block_num_txs {std::nullopt} |
static std::optional< int64_t > | m_last_block_size {std::nullopt} |
Private Member Functions | |
void | resetBlock () |
Clear the block's state and prepare for assembling a new block. More... | |
void | AddToBlock (const CTxMemPoolEntryRef &entry) |
Add a tx to the block. More... | |
void | addTxs (const CTxMemPool &mempool) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs) |
Add transactions from the mempool based on individual tx feerate. More... | |
bool | TestTxFits (uint64_t txSize, int64_t txSigChecks) const |
Test if a new Tx would "fit" in the block. More... | |
bool | CheckTx (const CTransaction &tx) const |
Check the transaction for finality, etc before adding to block. More... | |
Private Attributes | |
std::unique_ptr< CBlockTemplate > | pblocktemplate |
uint64_t | nMaxGeneratedBlockSize |
uint64_t | nMaxGeneratedBlockSigChecks |
CFeeRate | blockMinFeeRate |
uint64_t | nBlockSize |
uint64_t | nBlockTx |
uint64_t | nBlockSigChecks |
Amount | nFees |
int | nHeight |
int64_t | m_lock_time_cutoff |
const CChainParams & | chainParams |
const CTxMemPool *const | m_mempool |
Chainstate & | m_chainstate |
const avalanche::Processor *const | m_avalanche |
const bool | fPrintPriority |
node::BlockAssembler::BlockAssembler | ( | const Config & | config, |
Chainstate & | chainstate, | ||
const CTxMemPool * | mempool, | ||
const avalanche::Processor * | avalanche = nullptr |
||
) |
node::BlockAssembler::BlockAssembler | ( | Chainstate & | chainstate, |
const CTxMemPool * | mempool, | ||
const Options & | options, | ||
const avalanche::Processor * | avalanche = nullptr |
||
) |
|
private |
|
private |
Add transactions from the mempool based on individual tx feerate.
addTxs includes transactions paying a fee by ensuring that the partial ordering of transactions is maintained.
That is to say children come after parents, despite having a potentially larger fee.
Definition at line 298 of file miner.cpp.
|
private |
std::unique_ptr< CBlockTemplate > node::BlockAssembler::CreateNewBlock | ( | const CScript & | scriptPubKeyIn | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
|
static |
|
private |
|
private |
|
private |
|
private |