Generate a new block, without valid proof-of-work.
More...
#include <miner.h>
|
| void | resetBlock () |
| | Clear the block's state and prepare for assembling a new block. More...
|
| |
| void | AddToBlock (CTxMemPool::txiter iter) |
| | Add a tx to the block. More...
|
| |
| void | addPackageTxs (int &nPackagesSelected, int &nDescendantsUpdated) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs) |
| | Add transactions based on feerate including unconfirmed ancestors Increments nPackagesSelected / nDescendantsUpdated with corresponding statistics from the package selection (for logging statistics). More...
|
| |
| void | onlyUnconfirmed (CTxMemPool::setEntries &testSet) |
| | Remove confirmed (inBlock) entries from given set. More...
|
| |
| bool | TestPackage (uint64_t packageSize, int64_t packageSigOpsCost) const |
| | Test if a new package would "fit" in the block. More...
|
| |
| bool | TestPackageTransactions (const CTxMemPool::setEntries &package) |
| | Perform checks on each transaction in a package: locktime, premature-witness, serialized size (if necessary) These checks should always succeed, and they're here only as an extra check in case of suboptimal node configuration. More...
|
| |
| bool | SkipMapTxEntry (CTxMemPool::txiter it, indexed_modified_transaction_set &mapModifiedTx, CTxMemPool::setEntries &failedTx) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs) |
| | Return true if given transaction from mapTx has already been evaluated, or if the transaction's cached data in mapTx is incorrect. More...
|
| |
| void | SortForBlock (const CTxMemPool::setEntries &package, std::vector< CTxMemPool::txiter > &sortedEntries) |
| | Sort the package in an order that is valid to appear in a block. More...
|
| |
| int | UpdatePackagesForAdded (const CTxMemPool::setEntries &alreadyAdded, indexed_modified_transaction_set &mapModifiedTx) EXCLUSIVE_LOCKS_REQUIRED(mempool.cs) |
| | Add descendants of given transactions to mapModifiedTx with ancestor state updated assuming given transactions are inBlock. More...
|
| |
Generate a new block, without valid proof-of-work.
Definition at line 127 of file miner.h.
◆ BlockAssembler() [1/2]
| BlockAssembler::BlockAssembler |
( |
const CChainParams & |
params | ) |
|
|
explicit |
◆ BlockAssembler() [2/2]
◆ addPackageTxs()
| void BlockAssembler::addPackageTxs |
( |
int & |
nPackagesSelected, |
|
|
int & |
nDescendantsUpdated |
|
) |
| |
|
private |
Add transactions based on feerate including unconfirmed ancestors Increments nPackagesSelected / nDescendantsUpdated with corresponding statistics from the package selection (for logging statistics).
Definition at line 313 of file miner.cpp.
◆ AddToBlock()
Add a tx to the block.
Definition at line 231 of file miner.cpp.
◆ CreateNewBlock()
| std::unique_ptr< CBlockTemplate > BlockAssembler::CreateNewBlock |
( |
const CScript & |
scriptPubKeyIn, |
|
|
bool |
fMineWitnessTx = true |
|
) |
| |
Construct a new block template with coinbase to scriptPubKeyIn.
Definition at line 106 of file miner.cpp.
◆ onlyUnconfirmed()
Remove confirmed (inBlock) entries from given set.
Definition at line 193 of file miner.cpp.
◆ resetBlock()
| void BlockAssembler::resetBlock |
( |
| ) |
|
|
private |
Clear the block's state and prepare for assembling a new block.
Definition at line 92 of file miner.cpp.
◆ SkipMapTxEntry()
Return true if given transaction from mapTx has already been evaluated, or if the transaction's cached data in mapTx is incorrect.
Definition at line 286 of file miner.cpp.
◆ SortForBlock()
Sort the package in an order that is valid to appear in a block.
Definition at line 292 of file miner.cpp.
◆ TestPackage()
| bool BlockAssembler::TestPackage |
( |
uint64_t |
packageSize, |
|
|
int64_t |
packageSigOpsCost |
|
) |
| const |
|
private |
Test if a new package would "fit" in the block.
Definition at line 206 of file miner.cpp.
◆ TestPackageTransactions()
Perform checks on each transaction in a package: locktime, premature-witness, serialized size (if necessary) These checks should always succeed, and they're here only as an extra check in case of suboptimal node configuration.
Definition at line 220 of file miner.cpp.
◆ UpdatePackagesForAdded()
Add descendants of given transactions to mapModifiedTx with ancestor state updated assuming given transactions are inBlock.
Returns number of updated descendants.
Definition at line 250 of file miner.cpp.
◆ blockMinFeeRate
| CFeeRate BlockAssembler::blockMinFeeRate |
|
private |
◆ chainparams
◆ fIncludeWitness
| bool BlockAssembler::fIncludeWitness |
|
private |
◆ inBlock
◆ nBlockMaxWeight
| unsigned int BlockAssembler::nBlockMaxWeight |
|
private |
◆ nBlockSigOpsCost
| uint64_t BlockAssembler::nBlockSigOpsCost |
|
private |
◆ nBlockTx
| uint64_t BlockAssembler::nBlockTx |
|
private |
◆ nBlockWeight
| uint64_t BlockAssembler::nBlockWeight |
|
private |
◆ nFees
◆ nHeight
| int BlockAssembler::nHeight |
|
private |
◆ nLockTimeCutoff
| int64_t BlockAssembler::nLockTimeCutoff |
|
private |
◆ pblock
| CBlock* BlockAssembler::pblock |
|
private |
◆ pblocktemplate
The documentation for this class was generated from the following files: