PIVX Core  5.6.99
P2P Digital Currency
Classes | Namespaces | Typedefs | Functions
blockassembler.h File Reference
#include "primitives/block.h"
#include "txmempool.h"
#include <stdint.h>
#include <memory>
#include "boost/multi_index_container.hpp"
#include "boost/multi_index/ordered_index.hpp"
Include dependency graph for blockassembler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CBlockTemplate
 
struct  CTxMemPoolModifiedEntry
 
struct  CompareCTxMemPoolIter
 Comparator for CTxMemPool::txiter objects. More...
 
struct  modifiedentry_iter
 
struct  CompareModifiedEntry
 
struct  CompareTxIterByAncestorCount
 
struct  update_for_parent_inclusion
 
class  BlockAssembler
 Generate a new block. More...
 

Namespaces

 Consensus
 

Typedefs

typedef boost::multi_index_container< CTxMemPoolModifiedEntry, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< modifiedentry_iter, CompareCTxMemPoolIter >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ancestor_score >, boost::multi_index::identity< CTxMemPoolModifiedEntry >, CompareModifiedEntry > >> indexed_modified_transaction_set
 
typedef indexed_modified_transaction_set::nth_index< 0 >::type::iterator modtxiter
 
typedef indexed_modified_transaction_set::index< ancestor_score >::type::iterator modtxscoreiter
 

Functions

bool SolveBlock (std::shared_ptr< CBlock > &pblock, int nHeight)
 Modify the nonce/extranonce in a block. More...
 
void IncrementExtraNonce (std::shared_ptr< CBlock > &pblock, int nHeight, unsigned int &nExtraNonce)
 
int64_t UpdateTime (CBlockHeader *pblock, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
 
int32_t ComputeBlockVersion (const Consensus::Params &consensusParams, int nHeight)
 
bool CreateCoinbaseTx (CBlock *pblock, const CScript &scriptPubKeyIn, CBlockIndex *pindexPrev)
 
CMutableTransaction CreateCoinbaseTx (const CScript &scriptPubKeyIn, CBlockIndex *pindexPrev)
 
uint256 CalculateSaplingTreeRoot (CBlock *pblock, int nHeight, const CChainParams &chainparams)
 

Typedef Documentation

◆ indexed_modified_transaction_set

typedef boost::multi_index_container< CTxMemPoolModifiedEntry, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< modifiedentry_iter, CompareCTxMemPoolIter >, boost::multi_index::ordered_non_unique< boost::multi_index::tag<ancestor_score>, boost::multi_index::identity<CTxMemPoolModifiedEntry>, CompareModifiedEntry > >> indexed_modified_transaction_set

Definition at line 113 of file blockassembler.h.

◆ modtxiter

typedef indexed_modified_transaction_set::nth_index<0>::type::iterator modtxiter

Definition at line 115 of file blockassembler.h.

◆ modtxscoreiter

typedef indexed_modified_transaction_set::index<ancestor_score>::type::iterator modtxscoreiter

Definition at line 116 of file blockassembler.h.

Function Documentation

◆ CalculateSaplingTreeRoot()

uint256 CalculateSaplingTreeRoot ( CBlock pblock,
int  nHeight,
const CChainParams chainparams 
)

Definition at line 505 of file blockassembler.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ComputeBlockVersion()

int32_t ComputeBlockVersion ( const Consensus::Params consensusParams,
int  nHeight 
)

Definition at line 552 of file blockassembler.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateCoinbaseTx() [1/2]

bool CreateCoinbaseTx ( CBlock pblock,
const CScript scriptPubKeyIn,
CBlockIndex pindexPrev 
)

Definition at line 130 of file blockassembler.cpp.

◆ CreateCoinbaseTx() [2/2]

CMutableTransaction CreateCoinbaseTx ( const CScript scriptPubKeyIn,
CBlockIndex pindexPrev 
)

Definition at line 110 of file blockassembler.cpp.

Here is the caller graph for this function:

◆ IncrementExtraNonce()

void IncrementExtraNonce ( std::shared_ptr< CBlock > &  pblock,
int  nHeight,
unsigned int &  nExtraNonce 
)

Definition at line 535 of file blockassembler.cpp.

Here is the caller graph for this function:

◆ SolveBlock()

bool SolveBlock ( std::shared_ptr< CBlock > &  pblock,
int  nHeight 
)

Modify the nonce/extranonce in a block.

Definition at line 524 of file blockassembler.cpp.

Here is the call graph for this function:

◆ UpdateTime()

int64_t UpdateTime ( CBlockHeader pblock,
const Consensus::Params consensusParams,
const CBlockIndex pindexPrev 
)

Definition at line 43 of file blockassembler.cpp.

Here is the call graph for this function: