Changeset View
Changeset View
Standalone View
Standalone View
src/miner.h
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | private: | ||||
// 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 CChainParams &chainParams; | const CChainParams &chainParams; | ||||
const CTxMemPool &m_mempool; | const CTxMemPool &m_mempool; | ||||
CChainState &m_chainstate; | |||||
public: | public: | ||||
struct Options { | struct Options { | ||||
Options(); | Options(); | ||||
uint64_t nExcessiveBlockSize; | uint64_t nExcessiveBlockSize; | ||||
uint64_t nMaxGeneratedBlockSize; | uint64_t nMaxGeneratedBlockSize; | ||||
CFeeRate blockMinFeeRate; | CFeeRate blockMinFeeRate; | ||||
}; | }; | ||||
BlockAssembler(const Config &config, const CTxMemPool &mempool); | BlockAssembler(const Config &config, CChainState &chainstate, | ||||
BlockAssembler(const CChainParams ¶ms, const CTxMemPool &mempool, | const CTxMemPool &mempool); | ||||
const Options &options); | BlockAssembler(CChainState &chainstate, const CChainParams ¶ms, | ||||
const CTxMemPool &mempool, const Options &options); | |||||
/** 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(CChainState &chainstate, const CScript &scriptPubKeyIn); | CreateNewBlock(const CScript &scriptPubKeyIn); | ||||
uint64_t GetMaxGeneratedBlockSize() const { return nMaxGeneratedBlockSize; } | uint64_t GetMaxGeneratedBlockSize() const { return nMaxGeneratedBlockSize; } | ||||
static std::optional<int64_t> m_last_block_num_txs; | static std::optional<int64_t> m_last_block_num_txs; | ||||
static std::optional<int64_t> m_last_block_size; | static std::optional<int64_t> m_last_block_size; | ||||
private: | private: | ||||
// utility functions | // utility functions | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |