Changeset View
Changeset View
Standalone View
Standalone View
src/miner.cpp
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | void BlockAssembler::resetBlock() { | ||||
nBlockSize = 1000; | nBlockSize = 1000; | ||||
nBlockSigOps = 100; | nBlockSigOps = 100; | ||||
// These counters do not include coinbase tx. | // These counters do not include coinbase tx. | ||||
nBlockTx = 0; | nBlockTx = 0; | ||||
nFees = Amount::zero(); | nFees = Amount::zero(); | ||||
} | } | ||||
Optional<int64_t> BlockAssembler::m_last_block_num_txs{nullopt}; | std::optional<int64_t> BlockAssembler::m_last_block_num_txs{std::nullopt}; | ||||
Optional<int64_t> BlockAssembler::m_last_block_size{nullopt}; | std::optional<int64_t> BlockAssembler::m_last_block_size{std::nullopt}; | ||||
std::unique_ptr<CBlockTemplate> | std::unique_ptr<CBlockTemplate> | ||||
BlockAssembler::CreateNewBlock(const CScript &scriptPubKeyIn) { | BlockAssembler::CreateNewBlock(const CScript &scriptPubKeyIn) { | ||||
int64_t nTimeStart = GetTimeMicros(); | int64_t nTimeStart = GetTimeMicros(); | ||||
resetBlock(); | resetBlock(); | ||||
pblocktemplate.reset(new CBlockTemplate()); | pblocktemplate.reset(new CBlockTemplate()); | ||||
▲ Show 20 Lines • Show All 450 Lines • Show Last 20 Lines |