Changeset View
Changeset View
Standalone View
Standalone View
src/miner.h
Show First 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | private: | ||||
void AddToBlock(CTxMemPool::txiter iter); | void AddToBlock(CTxMemPool::txiter iter); | ||||
// Methods for how to add transactions to a block. | // Methods for how to add transactions to a block. | ||||
/** | /** | ||||
* Add transactions based on feerate including unconfirmed ancestors. | * Add transactions based on feerate including unconfirmed ancestors. | ||||
* Increments nPackagesSelected / nDescendantsUpdated with corresponding | * Increments nPackagesSelected / nDescendantsUpdated with corresponding | ||||
* statistics from the package selection (for logging statistics). | * statistics from the package selection (for logging statistics). | ||||
*/ | */ | ||||
void addPackageTxs(int &nPackagesSelected, int &nDescendantsUpdated) | void addPackageTxs(int &nPackagesSelected, int &nDescendantsUpdated, | ||||
bool fLimitSigOpCount) | |||||
EXCLUSIVE_LOCKS_REQUIRED(mempool->cs); | EXCLUSIVE_LOCKS_REQUIRED(mempool->cs); | ||||
// helper functions for addPackageTxs() | // helper functions for addPackageTxs() | ||||
/** Remove confirmed (inBlock) entries from given set */ | /** Remove confirmed (inBlock) entries from given set */ | ||||
void onlyUnconfirmed(CTxMemPool::setEntries &testSet); | void onlyUnconfirmed(CTxMemPool::setEntries &testSet); | ||||
/** Test if a new package would "fit" in the block */ | /** Test if a new package would "fit" in the block */ | ||||
bool TestPackage(uint64_t packageSize, int64_t packageSigOpCount) const; | bool TestPackage(uint64_t packageSize, int64_t packageSigOpCount, | ||||
bool fLimitSigOpCount) const; | |||||
/** | /** | ||||
* Perform checks on each transaction in a package: | * Perform checks on each transaction in a package: | ||||
* locktime, serialized size (if necessary). These checks should always | * locktime, serialized size (if necessary). These checks should always | ||||
* succeed, and they're here only as an extra check in case of suboptimal | * succeed, and they're here only as an extra check in case of suboptimal | ||||
* node configuration. | * node configuration. | ||||
*/ | */ | ||||
bool TestPackageTransactions(const CTxMemPool::setEntries &package); | bool TestPackageTransactions(const CTxMemPool::setEntries &package); | ||||
/** | /** | ||||
Show All 27 Lines |