![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
Generate a new block, without valid proof-of-work. More...
#include <miner.h>
Classes | |
| struct | Options |
Public Member Functions | |
| BlockAssembler (Chainstate &chainstate, const CTxMemPool *mempool, const Options &options) | |
| std::unique_ptr< CBlockTemplate > | CreateNewBlock () |
| Construct a new block template. | |
Static Public Attributes | |
| static std::optional< int64_t > | m_last_block_num_txs {} |
| The number of transactions in the last assembled block (excluding coinbase transaction). | |
| static std::optional< int64_t > | m_last_block_weight {} |
| The weight of the last assembled block (including reserved weight for block header, txs count and coinbase tx). | |
Private Member Functions | |
| void | resetBlock () |
| Clear the block's state and prepare for assembling a new block. | |
| void | AddToBlock (const CTxMemPoolEntry &entry) |
| Add a tx to the block. | |
| void | addChunks () EXCLUSIVE_LOCKS_REQUIRED(m_mempool -> cs) |
| Add transactions based on chunk feerate. | |
| bool | TestChunkBlockLimits (FeePerWeight chunk_feerate, int64_t chunk_sigops_cost) const |
| Test if a new chunk would "fit" in the block. | |
| bool | TestChunkTransactions (const std::vector< CTxMemPoolEntryRef > &txs) const |
| Perform locktime checks on each transaction in a chunk: This check should always succeed, and is here only as an extra check in case of a bug. | |
Private Attributes | |
| std::unique_ptr< CBlockTemplate > | pblocktemplate |
| uint64_t | nBlockWeight |
| uint64_t | nBlockTx |
| uint64_t | nBlockSigOpsCost |
| CAmount | nFees |
| int | nHeight |
| int64_t | m_lock_time_cutoff |
| const CChainParams & | chainparams |
| const CTxMemPool *const | m_mempool |
| Chainstate & | m_chainstate |
| const Options | m_options |
|
explicit |
|
private |
Add transactions based on chunk feerate.
Definition at line 279 of file miner.cpp.
|
private |
| std::unique_ptr< CBlockTemplate > node::BlockAssembler::CreateNewBlock | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
inlinestatic |
|
inlinestatic |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |