Changeset View
Changeset View
Standalone View
Standalone View
src/miner.h
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | private: | ||||
Amount nFees; | Amount nFees; | ||||
CTxMemPool::setEntries inBlock; | CTxMemPool::setEntries inBlock; | ||||
// Chain context for the block | // Chain context for the block | ||||
int nHeight; | int nHeight; | ||||
int64_t nLockTimeCutoff; | int64_t nLockTimeCutoff; | ||||
int64_t nMedianTimePast; | int64_t nMedianTimePast; | ||||
const Config *config; | const Config *config; | ||||
deadalnix: Why is that still useful? | |||||
jasonbcoxAuthorUnsubmitted Done Inline ActionsIt's needed because it's used a number of times in BlockAssembler::CreateNewBlock() and some other functions. It's not strictly needed, as the config could be passed into each function that needs it, but that is out of scope of this diff. jasonbcox: It's needed because it's used a number of times in `BlockAssembler::CreateNewBlock()` and some… | |||||
const CTxMemPool *mempool; | const CTxMemPool *mempool; | ||||
// Variables used for addPriorityTxs | // Variables used for addPriorityTxs | ||||
int lastFewTxs; | int lastFewTxs; | ||||
public: | public: | ||||
BlockAssembler(const Config &_config, const CTxMemPool &mempool); | struct Options { | ||||
Options(); | |||||
size_t nBlockMaxSize; | |||||
CFeeRate blockMinFeeRate; | |||||
}; | |||||
BlockAssembler(const Config &config, const CTxMemPool &mempool); | |||||
BlockAssembler(const Config &config, const CTxMemPool &mempool, | |||||
const Options &options); | |||||
deadalnixUnsubmitted Not Done Inline ActionsYou don't need the config here. deadalnix: You don't need the config here. | |||||
jasonbcoxAuthorUnsubmitted Done Inline ActionsIt's used to call config.GetMaxBlockSize() to set a safe limit on nMaxGeneratedBlockSize, regardless of input provided via options. jasonbcox: It's used to call `config.GetMaxBlockSize()` to set a safe limit on `nMaxGeneratedBlockSize`… | |||||
deadalnixUnsubmitted Not Done Inline ActionsTo the contrary, it's very relevant, because the whole point of this backport is to bring configs to BloackAssembler. deadalnix: To the contrary, it's very relevant, because the whole point of this backport is to bring… | |||||
/** Construct a new block template with coinbase to scriptPubKeyIn */ | /** Construct a new block template with coinbase to scriptPubKeyIn */ | ||||
std::unique_ptr<CBlockTemplate> | std::unique_ptr<CBlockTemplate> | ||||
CreateNewBlock(const CScript &scriptPubKeyIn); | CreateNewBlock(const CScript &scriptPubKeyIn); | ||||
uint64_t GetMaxGeneratedBlockSize() const { return nMaxGeneratedBlockSize; } | uint64_t GetMaxGeneratedBlockSize() const { return nMaxGeneratedBlockSize; } | ||||
private: | private: | ||||
// utility functions | // utility functions | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |
Why is that still useful?