15 #include <boost/multi_index_container.hpp> 16 #include <boost/multi_index/ordered_index.hpp> 24 static const bool DEFAULT_PRINTPRIORITY =
false;
40 nSizeWithAncestors = entry->GetSizeWithAncestors();
41 nModFeesWithAncestors = entry->GetModFeesWithAncestors();
42 nSigOpCostWithAncestors = entry->GetSigOpCostWithAncestors();
92 if (a->GetCountWithAncestors() != b->GetCountWithAncestors())
93 return a->GetCountWithAncestors() < b->GetCountWithAncestors();
98 typedef boost::multi_index_container<
100 boost::multi_index::indexed_by<
101 boost::multi_index::ordered_unique<
106 boost::multi_index::ordered_non_unique<
108 boost::multi_index::tag<ancestor_score>,
109 boost::multi_index::identity<CTxMemPoolModifiedEntry>,
115 typedef indexed_modified_transaction_set::nth_index<0>::type::iterator
modtxiter;
116 typedef indexed_modified_transaction_set::index<ancestor_score>::type::iterator
modtxscoreiter;
169 std::unique_ptr<CBlockTemplate> CreateNewBlock(
const CScript& scriptPubKeyIn,
bool fMineWitnessTx=
true);
182 void addPackageTxs(
int &nPackagesSelected,
int &nDescendantsUpdated);
188 bool TestPackage(uint64_t packageSize, int64_t packageSigOpsCost)
const;
210 #endif // RAVEN_MINER_H indexed_modified_transaction_set::nth_index< 0 >::type::iterator modtxiter
Comparator for CTxMemPool::txiter objects.
unsigned int nBlockMaxWeight
bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) const
CTxMemPool::setEntries inBlock
std::unique_ptr< CBlockTemplate > pblocktemplate
std::set< txiter, CompareIteratorByHash > setEntries
CChainParams defines various tweakable parameters of a given instance of the Raven system...
bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) const
indexed_modified_transaction_set::index< ancestor_score >::type::iterator modtxscoreiter
int64_t CAmount
Amount in corbies (Can be negative)
std::vector< int64_t > vTxSigOpsCost
CTxMemPool::txiter result_type
const CChainParams & chainparams
int GenerateRavens(bool fGenerate, int nThreads, const CChainParams &chainparams)
update_for_parent_inclusion(CTxMemPool::txiter it)
Generate a new block, without valid proof-of-work.
std::vector< CAmount > vTxFees
Parameters that influence chain consensus.
int64_t UpdateTime(CBlockHeader *pblock, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
indexed_transaction_set::nth_index< 0 >::type::iterator txiter
uint64_t nSizeWithAncestors
uint64_t nBlockSigOpsCost
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
CAmount nModFeesWithAncestors
The block chain is a tree shaped structure starting with the genesis block at the root...
const CChainParams & Params()
Return the currently selected parameters.
Serialized script, used inside transaction inputs and outputs.
int64_t nSigOpCostWithAncestors
Fee rate in satoshis per kilobyte: CAmount / kB.
CTxMemPoolModifiedEntry(CTxMemPool::txiter entry)
bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) const
void IncrementExtraNonce(CBlock *pblock, const CBlockIndex *pindexPrev, unsigned int &nExtraNonce)
Modify the extranonce in a block.
std::vector< unsigned char > vchCoinbaseCommitment